I want to run top is batch / non-interactive mode with
-b. However I want the output sorted by PID. What command line option does this? I'm using Debian Lenny and the
-o pid option from here ( http://www.unixtop.org/man.shtml ) doesn't work.
For me, on an Ubuntu system, with no
To set up
If you don't have a
To create the necessary configuration files:
To use the file you created to output
You could try running the output through sort e.g.
That sorts the default output numerically and therefore by PID. It does though mangle the order of the header lines.