Assigning Job Priorities
The following sections cover the commands necessary to view and change the priorities of running processes.
Viewing Jobs and Their Priority
You can use the -lf options with ps to show each running process (job) and its current priority. Each line of output has more than 80 characters, so the output can be confusing to read on an 80-character screen. In the following example, there is one heading line followed by process information about three commands: -ksh, ps -lf, and pg. (The dash (-) before ksh indicates that it is a login shell.) The command name is given in the last column of the process information. Check the man page on ps to see what all the columns mean.
$ ps -lf | pg F S UID PID PPID C PRI NI ADDR SZ WCHAN ...
Get Practical UNIX now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.