Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question

2 Answers 2

up vote 19 down vote accepted

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]
share|improve this answer
    
thanks it did work apretiate it –  sebas Mar 21 at 7:47

I suggest you to use htop. It is a great monitoring application which also shows you the niceness of each process running on your box.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.