[conspire] 'top' tricks (was: How much memory each process is taking up)

Nick Moffitt nick at zork.net
Wed Feb 25 00:13:57 PST 2009

Eric De Mund:
> (Thank you for that "M" trick in top(1), regarding which I just came
> across this bit in the man page: "Since this is primarily a service to
> former top users, these commands do not appear on any help screen".
> Arg.) 

You can control the columns used to sort with the < and > keys (although
it gives you no visual feedback as to which one is currently being
used).  My favorite thing is to fire up top, and then hit < immediately,
which sorts by process state.  Unfortunately it sorts backward from how
I'd like: it seems to go [Z, S, R, D], when I'm mostly interested in the
D-state (I/O wait) processes.  So I then need to hit shift-R to reverse
the sort order.

This is very handy when you're tracking down a thrashing process, or
when you've got some kind of lock contention dragging something down.
Few systems are CPU bound these days, so the Shift-M and <,Shift-R
tricks are the two most useful top modes I've found.

"These people program the way Victorians dress.              Nick Moffitt
It takes two hours and three assistants to put on           nick at zork.net
your clothes, and you have to change before dinner.
But everything is modular."    -- Miles Nordin, on PAM

More information about the conspire mailing list