12 TOP Command Examples in Linux.pdf

May 4, 2019 | Author: Victor L Wamukoya | Category: Linux, Server (Computing), Facebook, Operating System, Areas Of Computer Science
Share Embed Donate


Short Description

top 12 coomands to be used in linux...

Description

7/29/13

12 TOP Command Exampl es i n Linux

Advertise Hire Us Submit Articles Archives Who We Are? Contact Us Privacy Policy Co py  pyri righ ghtt Policy Policy Search

Home Lin Li nux Distros » Open Op en Source We b Servers Servers » Databases Da tabases » Lin Li nux Commands Commands

TecMint ecMint.com .com is a community driven Linux website. Our motto is to provide an effortless howto’s to our valuable valuable readers. You are also welcome to join our community and can be part of our team, contributing and submitti submitting ng well written article on Linux. If you have any query,

► Linux CPU

► Linux Box

► Linux Tools

► Linux Help

7/29/13

12 TOP Command Examples in Linux

# top

Linux Top Command 2. Sorting with -O (Uppercase Letter ‘O’).

Press (Shift+O) to Sort field via field letter, for example press ‘a‘ letter to sort process with PID (Process ID).

7/29/13

12 TOP Command Examples in Linux

Sorting Process ID’s with Top Type any key to return to main top window with sorted PID order as shown in below screen. Press ‘ q‘ to quit exit the window.

7/29/13

12 TOP Command Examples in Linux

Sorting Process ID’s 3. Display Specific User Process

Use top command with ‘u‘ option will display specific User process details. # top -u tecmint

7/29/13

12 TOP Command Examples in Linux

Top with Specific User Processes 4. Highlight Running Process in Top

Press ‘z‘ option in running top command will display running process in color which may help you to identified running process easily.

7/29/13

12 TOP Command Examples in Linux

Top Process with Colorful 5. Shows Absolute Path of Processes

Press ‘c‘ option in running top command, it will display absolute path of running process.

7/29/13

12 TOP Command Examples in Linux

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

12 TOP Command Examples in Linux

Top – Set Refresh Time 7. Kill running process with argument ‘k’

You can kill a process after finding PID of process by pressing ‘k ‘ option in running top command without exiting from top window as shown below.

7/29/13

12 TOP Command Examples in Linux

Top – Kill Process ID 8. Sort by CPU Utilisation

Press (Shift+P) to sort processes as per  CPU utilization. See screenshot below.

7/29/13

12 TOP Command Examples in Linux

Top – High CPU Utilization 9. Re nice a Process

You can use ‘r‘ option to change the priority of the process also called Renice.

7/29/13

12 TOP Command Examples in Linux

Top – Renice Process 10. Save Top Command Results

Press (Shift+W) to save the running top command results under  /root/.toprc.

7/29/13

Top Command Save Results 11. Getting Top Command Help

Press ‘h‘ option to obtain the top command help.

12 TOP Command Examples in Linux

7/29/13

12 TOP Command Examples in Linux

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. Bio

Latest Posts

7/29/13

12 TOP Command Examples in Linux

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 Solutions at fair minimum rates. Please submit your orders by Clicking Here.

Tw ee t

936

Like

10

0 Share Share

8

► Linux Tools

► Linux Help

► Unix

► Fedora

7/29/13

12 TOP Command Examples in Linux

 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

3.

 Ravi says:

7/29/13

12 TOP Command Examples in Linux

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) Mail (will not be published) (Required)

7/29/13

12 TOP Command Examples in Linux

Website

Submit Comment

Twitter 869 Twitter  Facebook 11390 Facebook  Google+ 281 Google+ RSS 1431 Subscribers Become A TecMint Subscriber to receive latest Updates. Enter Your Email Addres

Signup!

7/29/13

12 TOP Command Examples in Linux

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

CentOS 6.3 Step by Step Installation Guide with Screenshots71 Comments

7/29/13

12 TOP Command Examples in Linux

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

12 TOP Command Examples in Linux

©2013Tecmint: Linux Howtos, Tutorials & Guides.All rights reserved. Proudly designed by Tecmint.com.

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF