Ten ‘Top’ Command Examples
The “top” command provides a dynamic real-time view of a running system. It can display system summary information as well as a list of processes or threads currently being managed by the Linux kernel.
The types of system summary information shown and the types, order and size of information displayed for processes are all user configurable and that configuration can be made persistent across restarts.
Here are some top command examples.
If we type ‘top’ in terminal, this is how our output looks. By default, top command displays the output sorted by CPU usage.
1. Display processes sorted by memory usage
To display the top command output sorted by memory usage type uppercase letter “M”
2. Display all CPU’s in top command output
To display all CPU’s (cores) in the top output press “1″(Number 1).
3. Display the path’s of commands and arguments
To display the path’s of the command press lowercase “c”.
4. Split top command output into multiple segments
To split out the top command output into segments press uppercase “A”.
5. Kill a process without quitting from top
To kill a process without exiting from top command press lowercase “k”. Enter the PID of process to quit.
6. Display particular user output
To display output sorted by a particular user, use the parameter “-u”.
sk@sk:~$ top -u sk
7. Highlight running processes
To highlight the running processes in the top command output, press “z”.
8. Change refresh interval of top command
By default, the top command updates the output every 3 seconds. You can change the interval by pressing “s” key. It will ask you to enter the new time interval.
9. View help screen without quitting Top command
To view help screen interactively without exiting from top command press “h” or “?”. Press any key to exit from the help screen.
10. Save top command settings
If you want to save the changes you have made using the above commands, press uppercase “W”. It saves the settings to ~/.toprc. The changes will be used automatically later.
For more information to know about top command use man command.
sk@sk:~$ man top
Alternatively you can use “htop” command. It is even better and more powerful than top command.
Like us on Facebook
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- Manage Databases And Hosted Servers Remotely With DbNinja : Database administration via command line is bit difficult for newbie system and database administrat...0 comments |
- Setup IT And Asset Management System With GLPI On Debian/Ubuntu : GLPI is the Information Resource-Manager with an additional Administration Interface. You can use it...0 comments |
- How To Configure Linux Clients To Authenticate Using OpenLDAP : This is the continuation of our previous tutorial. In our previous tutorial we learned how to instal...0 comments |
- How To Upgrade From Ubuntu 13.04 Raring To Ubuntu 13.10 Saucy Salamander : Ubuntu 13.10 Saucy will be released on October 17th. Hope it will come with lot of improvements and ...0 comments |
- Install FrostWire 5.6.9 In Elementary OS 'Luna'/ Ubuntu / Linux Mint : FrostWire is a peer-to-peer file sharing program for the gnutella and BitTorrent protocols. FrostWir...0 comments |
- How To Install Linux Kernel 3.12.4 In Ubuntu
- Firefox 26 Has Been Released, How To Install It In Ubuntu And Its Derivates
- How To Install Brasero In Elementary OS ‘Luna’
- Install Sayonara Player In Elementary OS / Ubuntu / Linux Mint
- Manage Databases And Hosted Servers Remotely With DbNinja
- Install FrostWire 5.6.9 In Elementary OS ‘Luna’/ Ubuntu / Linux Mint
- Setup IT And Asset Management System With GLPI On Debian/Ubuntu
- How To Configure Linux Clients To Authenticate Using OpenLDAP
- How To Install Netflix In Ubuntu
- cowsay And fortune Combined Together
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .