Linux top command

The Linux top command, is the linux version of the windows task manager. By using this command we can see the different running processes and manage them.
we can kill processes, change their nice etc.
when we look at the top command we can see the uptime in the first line.
In the second line the number of tasks, how many running.
In the third line we can see the cpu information.
Some Keyboard shortcut:

  • l (lower case) will toggle on/off the uptime output.
  • (lower case) toggle the memory display.
  • t (lower case) toggle the cpu display.
  • f (lower case) show the current display field with asterisk, the field name and a short field description. we can use the arrow keys to navigate and space key for turn off/on the fields.
    keyboard shortcut:

    • s (lower case) sort the processes according to the selected field.
  • (lower case) after that writing user name, and it will show processes belong to the specific user.

 

top -b 
will run the top in a batch mode, mode that is more fit for running in a script.

Advertisements

Leave a Reply

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