7
7//2299//1133 1122TTOOPPCCoommmmaannddEExxaammpplleessiinnLLiinnuuxx
Search Search Advertise Advertise Hire Us Hire Us Submit Articles Submit Articles Archives Archives Who We Are? Who We Are? Contact Us Contact Us Privacy Policy Privacy Policy Co
Co py pyririghght Pot Policylicy
Home Home Li Linnux Distros »ux Distros » Op Open Sourceen Source We
We b Serv b Servers »ers »
Da
Databasestabases»»
Li
Linnux Commanux Commandsds
T
T
ecMint
ecMint
.com is a community driven Linux website. Our motto is to provide an effortless howto’s to our
.com is a community driven Linux website. Our motto is to provide an effortless howto’s to our
valu
valuable
able readers.
readers.
You are also welcome to join our community and can be part of our team,
► Linux CPU
7/29/13 12TOPCommandExamplesinLinux
# top
Linux Top Command
2. Sorting with -O (Uppercase Letter ‘O’).
7/29/13 12TOPCommandExamplesinLinux
Sorting Process ID’s with Top
7/29/13 12TOPCommandExamplesinLinux
Sorting Process ID’s
3. Display Specific User Process
Use top command with ‘u‘ option will display specific User process details.
7/29/13 12TOPCommandExamplesinLinux
Top with Specific User Processes 4. Highlight Running Process in Top
7/29/13 12TOPCommandExamplesinLinux
Top Process with Colorful
5. Shows Absolute Path of Processes
7/29/13 12TOPCommandExamplesinLinux
Top with Specific Process Path
6. Change Delay or Set ‘Screen Refresh Interval’ in Top
By default screen refresh interval is 3.0 seconds, same can be change pressing ‘ d‘ option in running top command and change it as desired as shown below.
7/29/13 12TOPCommandExamplesinLinux
Top – Set Refresh Time
7. Kill running process with argument ‘k’
7/29/13 12TOPCommandExamplesinLinux
Top – Kill Process ID 8. Sort by CPU Utilisation
7/29/13 12TOPCommandExamplesinLinux
Top – High CPU Utilization 9. Re nice a Process
7/29/13 12TOPCommandExamplesinLinux
Top – Renice Process
10. Save Top Command Results
7/29/13 12TOPCommandExamplesinLinux
Top Command Save Results 11. Getting Top Command Help
7/29/13 12TOPCommandExamplesinLinux
Bio Latest Posts
Top Command Help
12. Exit Top Command After Specific repetition
Top output keep refreshing until you press ‘q‘. With below command top command will automatically exit after 10 number of repetition.
# top -n 10
There are number of arguments to know more about top command you may refer man page of top command. Please share it if you find this article useful through our comment box below.
7/29/13 12TOPCommandExamplesinLinux Ravi Saive
Owner at TecMint.com
Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.
Linux Services & Free WordPress Setup
Our post is simply ‘DIY’ aka ‘Do It Yourself , still you may find difficulties and want us to help you out. We offer wide range of Linux and Web Hosting Solutionsat fair minimum rates. Please submit your orders by Clicking Here.
Tw ee t Tw ee t 936 Like 10 8 0 ShareShare
7/29/13 12TOPCommandExamplesinLinux
Ravi Saive says: August 28, 2012 at 9:47 pm @Victor Ostorga,
Thanks for pointing out, corrected now. Reply
2. Ashokkumar says:
September 17, 2012 at 6:45 pm Thanks.
Nice tutorial.
I m recently joined as system engineer.
Actually I dont know what top command performs, i have followed what you did in the screen. I got same result. Can you explain what is the purpose of this command?
How do I identify any wrong(process) in the terminal? Thanks
Reply
Ravi Saive says: September 17, 2012 at 6:55 pm
@AshokKumar – the top command is used to monitor real time running processes in Linux. It is used to identify which processes is utilizing high CPU or memory usage. so you can kill that process with top command as we mentioned above.
Reply
7/29/13 12TOPCommandExamplesinLinux February 4, 2013 at 6:47 pm
I tried write the top results to file, but i am not able to read the data, data is not well organised. Reply 4. Moosh says: March 13, 2013 at 6:25 pm I use htop Reply 5. gigi says: April 6, 2013 at 7:13 pm don’t forget ps-aux Reply 6. ferdinandp says: June 18, 2013 at 11:36 pm htop here… Reply
Leave a Reply
Name (Required)7/29/13 12TOPCommandExamplesinLinux Website Submit Comment Twitter 869Twitter Facebook 11390Facebook Google+ 281Google+ RSS 1431Subscribers
Become A
T
ecMint Subscriber to receive latest Updates.7/29/13 12TOPCommandExamplesinLinux
Popular Latest Comments Tags
Install Apache, MySQL 5.5.32 & PHP 5.5.0 on RHEL/CentOS 6.4/5.9 & Fedora 19-1288 Comments
Install Cacti (Network Monitoring) on RHEL/CentOS 6.3/5.8 and Fedora 17-1288 Comments
Wine 1.6 Released – Install in RHEL, CentOS and Fedora85 Comments
7/29/13 12TOPCommandExamplesinLinux
Install Google Chrome 28.0 on RHEL/CentOS 6 and Fedora 19/1544 Comments
Install Skype 4.1 in Ubuntu 12.10, Xubuntu 12.10 and Linux Mint 14/1343 Comments
15 Command Line Tools to Monitor Linux Performance41 Comments
Install VirtualBox 4.2.16 on RHEL/CentOS 6.4/5.9 and Fedora 19-1236 Comments
CentOS 6.4 Step by Step Installation Guide with Screenshots36 Comments
Install Linux Malware Detect (LMD) in RHEL, CentOS and Fedora35 Comments
First Ubuntu Edge Hands-On – VIDEO
7/29/13 12TOPCommandExamplesinLinux
©2013Tecmint: Linux Howtos, Tutorials & Guides.All rights reserved. Proudly designed by Tecmint.com.