Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Linux Tutorials»How to Read Linux Top Command Output and Uses

    How to Read Linux Top Command Output and Uses

    RahulBy RahulDecember 7, 20133 Mins ReadUpdated:May 8, 2020

    Understanding Linux top command results. As a Linux system administrator, the top command is a frequently used command and our daily tasks we used multiple times this commands to view resource utilization by processes on the server. This command helps us to find which process is utilizing what resources of the system.

    • Sysstat – Linux System Performance Monitoring Tool
    • Glances – A Real-Time Linux System Monitoring Tool

    Using this article, I am trying to write to how to use to command and understand the results of top command on the Linux system

    How to Read Linux Top Command Output

    When you execute the 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

    The Row 1 results show about server uptime from the last reboot, currently logged in users and CPU load on the server. The same output you can find using Linux uptime command.

    Linux top command result line 1

    Result Row #2

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

    Linux top command result line 2

    Zombie process or defunct process is a process that has completed execution but still has an entry in the process table. This entry is still needed to allow the parent process to read its child’s exit status.

    Result Row #3

    Row three shows the CPU utilization status on the server, you can find here how much CPU is free and how much is utilizing by the system.

    Linux top command result line 3

    Steal time is the time that a virtual CPU waits for a real CPU while the hypervisor is servicing another virtual processor.
    Definition from access.redhat.com

    Result Row #4

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

    Linux top command result line 4

    Result Row #5

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

    Linux top command result line 5

    Result Row #6 ( Running Processes )

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

    Linux top command result line 6

    Short Results Based on Specific Fields

    You can also sort the results based on the specific field. Use the following key combination to do short.

    Press "SHIFT + F" and Select your choice below and press ENTER.
    
      A     ( PID = Process Id )
      b     (  PPID   = Parent Process Pid )
      d     (  UID= User Id )
      e     (  USER   = User Name )
      f     (  GROUP  = Group Name )
      g     (  TTY= Controlling Tty )
      h     (  PR = Priority )
      i     (  NI = Nice value )
      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.

    how to read top command result linux top command result of top command Top top command understand top output understanding top command output
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Install Banshee Media Player on Fedora 20/19/18
    Next Article How to Add Multiple Hosts in phpMyAdmin

    Related Posts

    What is the /etc/aliases file

    2 Mins Read

    What is the /etc/nsswitch.conf file in Linux

    2 Mins Read

    How to Setup Squid Proxy Server on Ubuntu and Debian

    Updated:June 17, 20225 Mins Read

    How to Delete a Let’s Encrypt Certificate using Certbot

    Updated:June 3, 20222 Mins Read

    How to Install Latest Git on Ubuntu 22.04

    Updated:May 31, 20222 Mins Read

    How To Install LibreOffice on Ubuntu 22.04

    Updated:May 23, 20222 Mins Read

    16 Comments

    1. Bile Bakshi on September 10, 2019 3:27 pm

      nicely explain.

      Reply
    2. Debushree Ghosh on July 16, 2019 11:45 am

      Excellent way of explaining. Really useful

      Reply
    3. PradeepS on July 9, 2019 10:28 am

      Clear and crisp. Thank you Rahul

      Reply
    4. Vishweshwar on April 23, 2018 1:57 pm

      Row #2 and Row #3 are same, whereas Row #2 should be Tasks and Row #3 should be CPU(s)

      Reply
    5. siva kumar reddy on December 14, 2017 9:13 am

      Hi

      Please check the typo mistake.(in row3 last line ni–>st).this one helped me much.

      Thank you,
      siva kumar reddy.

      Reply
      • Rahul K. on January 22, 2018 6:03 am

        Thanks Siva, Image has been updated.

        Reply
    6. pradeep on July 10, 2017 5:53 am

      Neat work and well explained. Thank you for this KM.

      Reply
    7. Seshagiri Kondaveti on April 12, 2016 12:39 pm

      Very informative , thanks for sharing it.

      Reply
    8. Abhimanyu Singh on December 20, 2015 4:01 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

      Reply
    9. Tushar on July 30, 2015 10:01 am

      Very nice explanation but some more description of fields

      Reply
    10. Chris on January 21, 2015 8:32 pm

      You are missing a key point or am i?

      In result row #1 you have the load averge of cpu time in 1min, 5min and 15min.

      Results are:
      3.48 @ 1min.
      4.98 @ 5min.
      4.11 @ 15min.

      but what those there number mean.? it cannot be a readout of the CPU load averge over 1min, 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?!?!?.

      Well it’s not like your Windows friendly view, it’s linux and thank god.

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

      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.

      This should tell you that there is still a good 52% left on one core, and we don’t need to raise an alarm depending on the average load every 5 or 15min.
      Now every 5min we have a load over 4. It’s 4.98 and i lost you again.

      If we have 4 core where every core can max at 1 why do we have above 4 on a 4 core system?

      Well this counter is so much more, 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

      Reply
      • MH on June 17, 2017 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….:)

        Reply
    11. yellaiah on November 29, 2014 3:37 pm

      Nice explanation. people can understand very easily even he/she does not know.

      Reply
    12. Ganesh on November 5, 2014 2:18 pm

      Very nice explanation but still you can explain in detail about swap size,cached size,Buffer size etc..

      Reply
    13. prasad on December 9, 2013 9:51 am

      u given a clear explanation, so please update the other commands also like this.

      Reply
    14. Rohit Gupta on December 7, 2013 8:13 pm

      Very nice and clearly explained…… thanks for sharing this…..

      Reply

    Leave A Reply Cancel Reply

    Recent Posts
    • Filesystem Hierarchy Structure (FHS) in Linux
    • How to accept user input in Python
    • What is difference between var, let and const in JavaScript?
    • What is CPU? – Definition, Types and Parts
    • What is the /etc/aliases file
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.