top -bHn 1 -u mail
I've read through the man pages and there seems to be some stuff there that is not included in them. Pointing me to additional documentation would be helpful too. In particular, I'm not sure what the 1 is doing or mail. Thanks!
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
-b : Batch mode operation Starts top in 'Batch mode', which could be useful for sending output from top to other programs or to a file. In this mode, top will not accept input and runs until the iterations limit you've set with the '-n' command-line option or until killed. -H : Threads toggle Starts top with the last remembered 'H' state reversed. When this toggle is On, all individual threads will be displayed. Otherwise, top displays a summation of all threads in a process. -n : Number of iterations limit as: -n number Specifies the maximum number of iterations, or frames, top should produce before ending. -u : Monitor by user as: -u somebody Monitor only processes with an effective UID or user name matching that given.
So it means operate in batch mode (
-b), toggle thread display (
-H), for a single iteration (
-n 1), showing only processes belonging to user
-u mail) : basically an one-time snapshot of the current threads belonging to
ps -Lfu mail