DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Controlling processes

Identifying the niceness of a process

To obtain a listing of your processes and their nice values, enter ps -l. The eighth column of output, headed ``NI'', shows the nice value. The following command line strips out just the command name and the nice value for each of the active processes:

   $ ps -l | awk '{ printf("%s\t%s\n",$NF,$8)}'
(For more information on the awk(C) programming language, see ``Using awk''). Note that when you run a process in the background under the Korn shell and the bgnice variable is set, the process runs with a nice value of 4. (You can examine the Korn shell's internal variables by entering the command set -o; you can switch bgnice off by typing set +o bgnice or switch it on by typing set -o bgnice.)

Next topic: Scheduling your processes
Previous topic: Reducing the priority of a process

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003