Sei sulla pagina 1di 10

How to Read Linux Top Command Output and ... https://tecadmin.net/understanding-linux-top-...

SUBSCRIBE NEWSLETTER!

Email address:
 HOME UBUNTU 16.04 FEEDBACK FUNNY TOOLS TUTORIALS
Your email address
SUBMIT ARTICLE ABOUT US
Subscribe!
Hosted @DigitalOcean

07 How to Read
DECEMBER
2013 Linux Top
Command
Output and Uses
Written by Rahul K.

  Linux Tutorials

 how to read top command result, linux top command,


result of top command, Top, top command, understand top
output, understanding top command output

 11 Comments
 Search Now

Top Command: As a Linux system administrator,


top command is a frequently used command and
our daily tasks we used multiple times this

commands to view resource utilization by
processes on server. This command helps us to
find which process is utilizing what resources of
system.

1 of 10 26/12/2017, 15:24
How to Read Linux Top Command Output and ... https://tecadmin.net/understanding-linux-top-...

Using this article, I am trying to write to how to use


SUBSCRIBE NEWSLETTER!

Email address:

Command
Subscribe!
Hosted @DigitalOcean

When we execute top command on linux, it shows


a lot of results, here i am trying to show you to how
to read it row by row.

Result Row #1:


Row 1 results shows about server up time from last
reboot, currently logged in users and cpu load on
server. The same output you can find using linux
uptime command.

Result Row #2:


Row 2 shows the number of process running on
server and there state.

2 of 10 26/12/2017, 15:24
How to Read Linux Top Command Output and ... https://tecadmin.net/understanding-linux-top-...

Zombie process or defunct process is a process


POPULAR POSTS
SUBSCRIBE NEWSLETTER!ution but still has an
. This entry is still needed How to Install Joomla
Email address:
3.8 CMS on Ubuntu,
ss to read its child’s exit
Debian, LinuxMint

Subscribe! How to Disable Strict


Hosted @DigitalOcean

SQL Mode in MySQL 5.7

Row three shows the cpu utilization status on Reset Joomla Admin
server, you can find here how much cpu is free Password via SQL or
phpMyAdmin
and how much is utilizing by system.

Definition from access.redhat.com:


Steal time is the time that a virtual CPU waits for a
real CPU while the hypervisor is servicing another
virtual processor.

Result Row #4:


Row 4 shows the memory utilization on server, you
can find here how much memory is used, the
same results you can find using free command.

3 of 10 26/12/2017, 15:24
How to Read Linux Top Command Output and ... https://tecadmin.net/understanding-linux-top-...

SUBSCRIBE NEWSLETTER!

Email address:
emory utilization on
how much swap is being

Subscribe! free
Hosted @DigitalOcean

Result Row #6 ( Running Processes ):


In this steps you will see all running process on
servers and there additional details about them
like below.

If you want to sort output on basis of any fields,



you can use following key combinations.

Press "SHIFT + F" and Select your choice below and press

4 of 10 26/12/2017, 15:24
How to Read Linux Top Command Output and ... https://tecadmin.net/understanding-linux-top-...

A ( PID = Process Id )
ent Process Pid )
SUBSCRIBE NEWSLETTER!

Email address:

Subscribe!
Hosted @DigitalOcean

j ( P = Last used cpu (SMP) )


k ( %CPU = CPU usage )
l ( TIME = CPU Time )
n ( %MEM = Memory usage (RES) )
o ( VIRT = Virtual Image (kb) )
p ( SWAP = Swapped size (kb) )
q ( RES= Resident size (kb) )
r ( CODE = Code size (kb) )
s ( DATA = Data+Stack size (kb) )
t ( SHR= Shared Mem size (kb) )
w ( S = Process Status )
x ( COMMAND= Command name/line )

Thank you for reading this port, If this port is


helpful for you, please do not forgot to share it. If
you have any suggestions please put your
comments below.

Ads by Google

1.Linux Virtual Server

3.Top ID
Ads by Google

1.Linux Virtual Server

3.Explanation

RAHUL K.   

I, Rahul Kumar is the founder and chief editor of

5 of 10 26/12/2017, 15:24
How to Read Linux Top Command Output and ... https://tecadmin.net/understanding-linux-top-...

TecAdmin.net. I am Red Hat Certified Engineer (RHCE) and

SUBSCRIBE NEWSLETTER!

Email address:

Subscribe!
Hosted @DigitalOcean

and Performance
Monitoring Tools
for Linux
October 11, 2013

6 of 10 26/12/2017, 15:24
How to Read Linux Top Command Output and ... https://tecadmin.net/understanding-linux-top-...

SUBSCRIBE NEWSLETTER!
REPLY TO SIVA
Email address:

Subscribe! istake.(in row3 last line


Hosted @DigitalOcean

Thank you,
siva kumar reddy.

PRADEEP  REPLY TO PRADEEP


July 10, 2017 at 5:53 am
Neat work and well explained. Thank you for this
KM.

SESHAGIRI KONDAVETI
April 12, 2016 at 12:39 pm  REPLY TO SESHAGIRI

Very informative , thanks for sharing it.

ABHIMANYU SINGH
December 20, 2015 at 4:01  REPLY TO ABHIMANYU
pm

Awesome explanation, however %ni has been repeated


twice which should be %st : steal time in the CPU Usage
Section. Please correct it.

Thanks
Abhimanyu Singh

TUSHAR  REPLY TO TUSHAR 


July 30, 2015 at 10:01 am
Very nice explanation but some more
description of fields

7 of 10 26/12/2017, 15:24
How to Read Linux Top Command Output and ... https://tecadmin.net/understanding-linux-top-...

CHRIS  REPLY TO CHRIS

SUBSCRIBE NEWSLETTER!

Email address:

Subscribe!
Hosted @DigitalOcean

but what those there number mean.? it cannot


NAME * be a readout of*the CPU load averge
EMAIL over 1min,
WEBSITE
you CPU would be idle most of the time if the
averge load is 3.48, on my linux machine this
number is less than 1.

So wtf is it?!?!?.
I'm not a robot
reCAPTCHA
Well it’s not like your Windows friendly view, it’s
Privacy - Terms

linux and thank god.

SUBMIT
It’s hard to explain and maybe someone else can
do it better but here goes.

NOTIFY ME OF FOLLOW-UP COMMENTS BY EMAIL.


Lets say your system is running with a 4 core CPU,
on a Windows PC you would see the 4 cores and
the average load each sec.

You can’t simply move one thing to another core,


just like you can’t walk through two doors at the
same time.
However my wife would arguing this.

We can’t do two things at the same time, but if


we have two doors, why not send one thing
through one door and another through the next
and so on.

Btw a CPU with hyperthreading is not a core…!

So lets say it’s a 4 core CPU, and we have the


same average load of 3.48 the first minute, then 
4.98 every 5 minute and 4.11 every 15minute.

We can translate this to 3 of the cores are at 100%


load, and one if at 48%.
However this is not true, as we cannot see each
core, but the totalt amount so we can only guess.

8 of 10 26/12/2017, 15:24
How to Read Linux Top Command Output and ... https://tecadmin.net/understanding-linux-top-...

This should tell you that there is still a good 52% left on one
n alarm depending on
SUBSCRIBE NEWSLETTER!
ver 4. It’s 4.98 and i lost
Email address:

e can max at 1 why do we

Subscribe!
Hosted @DigitalOcean

, it’s current load or a givin


load over a time, it’s the amount the system would like to
utilize over a givin periode of time.
WTF.! stop plz.

Yeah i know, if only it was Windows and we could all die in a


puddel of licens.
Install htop, it would give you a more “user friendly” view.

On debian you should just apt-get install htop


redhat users should add repoforge anyway.

Now that we know our system is overloaded, how can we fix


it?

By using top to see what is hooking all the CPU time.

Hope you can update you’re guide to include what these


numbers mean as they are not the amount of CPU load in %

You can find this number on a linux machine with this


command cat /proc/cpuinfo | grep ‘model name’ | wc -l

MH  REPLY TO MH
June 17, 2017 at 7:34 pm
Hey,

This article seems to basic informative


with variable explanations within top
command, why are you arguing with
load values. Also please specify why
your are specifying overload with 4
core! Does the article mentioned in such 
a way!!!

Last but not least, Please do manner in


your replies….:)

9 of 10 26/12/2017, 15:24
How to Read Linux Top Command Output and ... https://tecadmin.net/understanding-linux-top-...

YELLAIAH  REPLY TO YELLAIAH


. This site uses cookies. By using this website you agree our
SUBSCRIBE NEWSLETTER!
e can understand very
Email address:

Subscribe!
Hosted @DigitalOcean

10 of 10 26/12/2017, 15:24

Potrebbero piacerti anche