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
We need your assistance to stay live
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 |
- 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 LAMP Server (Apache, MySQL or MariaDB, PHP) On Ubuntu 13.10 : Updated January 12, 2014 LAMP is a combination of operating system and open-source software stack. ...0 comments |
- DNS Server Installation Step by Step Using CentOS 6.5/6.4/6.3 : DNS, Domain Name System, translates hostnames or URLs into IP addresses. For example if we type www....0 comments |
- Install Power Commands 0.1.5 On Ubuntu 14.04/13.10/12.10/12.04 : Power Commands, power management application created by the Atareao team , this app helps users to...0 comments |
- Resolve slow connexion when using wifi in ubuntu 13.10 Saucy Salamander , 13.04 and LinuxMint13 : Updated-14/10/2013: If after installing or upgrading to ubuntu 13.10 Saucy Salamander. if you not...0 comments |
- Fedora 21 Scheduled For Release In October
- Install Uget Download Manager In Ubuntu, Fedora, Debian
- Download Elementary OS ‘Luna’ Official Wallpapers
- Install Power Commands 0.1.5 On Ubuntu 14.04/13.10/12.10/12.04
- 5 Android Apps that’s Going to Make Running Your Business Less Stressful
- Puppet agent Install Using Script
- Install Corosync and Pacemaker On CentOS 6.5
- Install Fail2Ban On Ubuntu Server 13.04/13.10
- How To Install Google Chrome in Fedora 20, 19, 18
- How to surf using Tor Browser Bundle
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .