O'Reilly logo

Practical UNIX by Steve Moritsugu - DTR Business Systems

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required