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.
| ||||
|
feedback
|
|
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
| |||
|
feedback
|
|
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. | |||
|
feedback
|
top -b -n1and it was sorted by ascending pid. I also do not seem to have the-ooption. – Kyle Smith Jan 20 '11 at 14:22manpage seems to document the BSD version oftoprather than the GNU version. Since it mentions Linux, it would seem to imply that Linux versions support the-ooption. Perhaps there is a Linux port of the BSD version. – Dennis Williamson Jan 20 '11 at 15:57