April 1998
Intermediate to advanced
624 pages
16h 11m
English
Most people know about the ps command. It gives a high-level summary of the status of processes on a system. It has many options, but using it is a relatively crude way to figure out what processes are doing.
Of all the available options, the best performance-related summary comes from the BSD version /usr/ucb/ps uax, which collects all the process data in one go, sorts the output by recent CPU usage, then displays the result. The unsorted versions of ps loop through the processes, printing as they go. This approach spreads out the time at which the processes are measured, and the last line process measured is significantly later than the first. By being collected in one go, the sorted versions give a more consistent view ...