Thursday, February 22, 2024
 Popular · Latest · Hot · Upcoming
55
rated 0 times [  55] [ 0]  / answers: 1 / hits: 49692  / 1 Year ago, sun, december 4, 2022, 6:00:24

Is there any way to check my nice lvl? I did try with ps, but for some reason the output does not show the column NI which is meant to show the lvl priority if I'm not wrong.



ps -fl -c 

F S UID PID PPID CLS PRI ADDR SZ WCHAN STIME TTY TIME CMD
0 S sebas 9761 26810 TS 19 - 6564 wait 18:07 pts/4 00:00:00 bash
0 R sebas 25389 9761 TS 19 - 5661 - 18:27 pts/4 00:00:00 ps -fl -c

More From » nice

 Answers
1

The -o flag allows you to specify columns. If you want to see your nice level, this would be in the NI column. So to see all processes with their nice level, do something like:

ps ax -o pid,ni,cmd
This will list the process ID, the nice level, and the actual command.






Example:



  $ps ax -o pid,ni,cmd
PID NI CMD
1 0 /sbin/init
2 -5 [kthreadd]
3 - [migration/0]
4 -5 [ksoftirqd/0]
5 - [watchdog/0]
6 - [migration/1]
7 -5 [ksoftirqd/1]
8 - [watchdog/1]

[#26406] Tuesday, December 6, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dileble

Total Points: 169
Total Questions: 105
Total Answers: 141

Location: Sao Tome and Principe
Member since Wed, Dec 29, 2021
2 Years ago
;