<<

Checking nice level of : For information on a load of processes you don’t care about, run: -efl

For useful output, run: ps -l

The NI field shows the nice value of the process. The nice value determines the priority of the process. The higher the value, the lower the priority--the "nicer" the process is to other processes. The default nice value is 0 on workstations.

The SZ field displays the size of the process in memory. The value of the field is the number of pages the process is occupying. On Linux machines, a page is 4,096 bytes.

How to ‘nice’ a process: Nicing a job reduces its priority level and preferentially allocates the CPU to interactive processes. Please note that in the absence of any other interactive or un- niced jobs maximum CPU is allocated to the niced job. The ‘nice’ value goes from 0 to 19: the higher this value, the lower priority the job. The RockMag group uses 19 – this is advised for all other users.

How to apply: The renice sets the nice value of your current process (and all processes that you start from it) to a ‘nice’ value specified by you ($$ is an in both sh and csh that is the Current Process ID – what that means is that all subsequent processes will be reniced to the level set by you). The ‘nice’ value in this case is 19: renice 19 $$ something.exe

Note renice commands are NOT cumulative (the value is added onto the system default nice value). So this has EXACTLY the same effect as the above example: renice 19 $$ renice 19 $$ something.exe

All subsequently run processes will come up with a nice value of 19, even when I did not preface them with the nice command.

You can change the nice setting of an individual process as follows (nice value set to 19 in this case): renice 19 [PID]

Where [PID] is the process ID, determined by running the ps function (note: ‘PID’ column, not ‘PPID’ column).