sort top output

terminalThe top command is used to capture the live status of Linux process. It is a very useful command for debugging process related issues. By default the top command is very dynamic and changes so much that it is very difficult to track a single process. To find out the rogue process there i a way to sort the output of top. Most important fields to sort by are %CPU and %MEM. For other fields refer to man top, section 3c.

To sort by CPU usage, run top and then press <Shift-p>.
To sort by memory usage <Shift-m>.

One thought on “sort top output”

Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s