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 |
- News from Kaspersky Lab: Tor is protecting criminals : In a previous article I wrote a bit about Tor. Free browser, relays bouncing your IP all over the ...0 comments |
- Grive: An Unofficial, Open Source Linux Client For Google Drive : A couple of months before, we have featured a Linux client for Google Drive named Syncdrive, which w...0 comments |
- Setup LDAP Server in CentOS, RHEL, Scientific linux 6.5/6.4/6.3 : In this tutorial we are going to setup LDAP server using 389 Directory Server. The 389 Directory Ser...0 comments |
- Canonical Works with Cisco! : The Ubuntu distribution is known to everybody nowadays, right? The company behind its development ...1 comment |
- How To Access A LVM Drive / Partition in Ubuntu : Hey Guys, I installed Fedora on an external drive (LVM) recently and was trying to access it from U...0 comments |
- Download 11 Community Wallpapers Chosen For Ubuntu 14.04 “Trusty Tahr”
- Ubuntu 14.04 LTS “Trusty Tahr” Default Wallpaper Revealed!
- Canonical Works with Cisco!
- Android Intercom: An Excellent Intercom App For Bikers Or Hiking Fans
- Install Google Talk Plugin In Fedora 20
- Adding and Deleting Cluster Resources (corosync pacemaker)
- News from Kaspersky Lab: Tor is protecting criminals
- Install Satis On Ubuntu Sever 13.10/13.04
- How To Access A LVM Drive / Partition in Ubuntu
- How To Disable Remember Open Files in Sublime Text 3
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .