{"id":2310,"date":"2017-04-08T05:57:03","date_gmt":"2017-04-08T05:57:03","guid":{"rendered":"http:\/\/www.fastwebhost.in\/blog\/?p=2310"},"modified":"2019-01-22T10:00:25","modified_gmt":"2019-01-22T10:00:25","slug":"what-is-top-command-and-how-to-read-top-command","status":"publish","type":"post","link":"https:\/\/www.fastwebhost.in\/blog\/what-is-top-command-and-how-to-read-top-command\/","title":{"rendered":"What is Top Command and How to Read Top Command?"},"content":{"rendered":"<p>\u200bTop command is one of the basic command to monitor server processes in Linux. Top command shows all running processes in the server. It shows you the system information and the processes information just like up-time, average load, tasks running, no. of users logged in, no. of CPU processes, RAM utilisation and it lists all the processes running\/utilised by the users in your server.<\/p>\n<p>I am sure, this article will help you to check the basics about the processes running on your VPS or Dedicated servers.<\/p>\n<p>\u200bLets see how to read the Top Command &nbsp;and understand it well.<\/p>\n<h2>Top Command Output<\/h2>\n<p>The below command to be run once you login to server from terminal.\u200b<\/p>\n<p>\u200btop<\/p>\n<p>All you see will be just like the image I share you below<\/p>\n<p><span><img loading=\"lazy\" decoding=\"async\" alt=\"TopCommand : Output\" style=\"width: 696px\" src=\"\/\/www.fastwebhost.in\/blog\/wp-content\/uploads\/2017\/04\/TopCommandOutput.png\" width=\"696\" height=\"164\" data-attachment-id=\"2329\"><\/span><\/p>\n<p>Let\u2019s see every single row of the output to explain all the information found within the screen.<\/p>\n<h2>First Row : top<\/h2>\n<p><span><img loading=\"lazy\" decoding=\"async\" alt=\"Top command : Row 1\" style=\"width: 696px\" src=\"\/\/www.fastwebhost.in\/blog\/wp-content\/uploads\/2017\/04\/firstrowtop.png\" width=\"696\" height=\"186\" data-attachment-id=\"2319\"><\/span><\/p>\n<p>\u200bThe very first line of the top command indicates in the order below.<\/p>\n<ul>\n<li>\n<p>current time (22 :14:26)<\/p>\n<\/li>\n<li>\n<p>uptime of the machine (up 155 day, 16:33)<\/p>\n<\/li>\n<li>\n<p>users sessions logged in (2 users)<\/p>\n<\/li>\n<li>average load on the system (load average: 8.02, 8.67, 9.01) the 3 values refer to the last minute, five minutes and 15 minutes.<\/li>\n<\/ul>\n<h2>Second Row : task<\/h2>\n<p><span><img loading=\"lazy\" decoding=\"async\" alt=\"Top Command : Row2\" style=\"width: 696px\" src=\"\/\/www.fastwebhost.in\/blog\/wp-content\/uploads\/2017\/04\/secondrowtasks.png\" width=\"696\" height=\"164\" data-attachment-id=\"2321\"><\/span><\/p>\n<p>The \u200bsecond row provides you the following information.<\/p>\n<ul>\n<li>\n<p>Total Processes running (866 total)<\/p>\n<\/li>\n<li>\n<p>Running Processes (8 running)<\/p>\n<\/li>\n<li>\n<p>Sleeping Processes (856 sleeping)<\/p>\n<\/li>\n<li>\n<p>Stopped Processes (0 stopped)<\/p>\n<\/li>\n<li>Processes waiting to be stopped from the parent process (2 zombie)<\/li>\n<blockquote><p><span style=\"color: rgb(10, 38, 237);\">Zombie Process<\/span> : <span style=\"color: rgb(237, 131, 45);\">A process that has completed execution, but still has an entry in the process table. This entry still need to allow the parent process to read its child exit status.<\/span><\/p><\/blockquote>\n<\/ul>\n<h2>Third Row : cpu<\/h2>\n<p>\u200bThe third row indicates how the cpu is used. If you sum up all the percentages the total will be 100% of the cpu. Let\u2019s see what these values indicate in order.<\/p>\n<p>All the CPU Processes will show in percentagess(%&#8217;s)\u200b<\/p>\n<ul>\n<li><span><img loading=\"lazy\" decoding=\"async\" alt=\"Top Command : Row3\" style=\"width: 646px\" src=\"\/\/www.fastwebhost.in\/blog\/wp-content\/uploads\/2017\/04\/ThirdrowCPU-Processes.png\" width=\"646\" height=\"166\" data-attachment-id=\"2325\"><\/span>\n<p>User processes of CPU in percentage(18.6%us)<\/p>\n<\/li>\n<li>\n<p>System processes of CPU in percentage(16.8%sy)<\/p>\n<\/li>\n<li>\n<p>Priority upgrade <em>nice<\/em>&nbsp;of CPU in percentage(0.2%ni)<\/p>\n<\/li>\n<li>\n<p>Percentage of the CPU not used (64.1%id)<\/p>\n<\/li>\n<li>\n<p>Processes waiting for I\/O operations of CPU in percentage(0.3%wa)<\/p>\n<\/li>\n<li>\n<p>Serving hardware interrupts of CPU in percentage(0.1% hi \u2014 Hardware IRQ<\/p>\n<\/li>\n<li>\n<p>Percentage of the CPU serving software interrupts (0.0% si \u2014 Software Interrupts<\/p>\n<\/li>\n<\/ul>\n<p>The amount of CPU \u2018stolen\u2019 from this virtual machine by the hypervisor for other tasks (such as running another virtual machine) this will be 0 on desktop and server without Virtual machine. (0.0%st \u2014 Steal Time)<\/p>\n<h2>Fourth and Fifth Row : Memory usage<\/h2>\n<p><span><img loading=\"lazy\" decoding=\"async\" alt=\"Top Command : Row4\" style=\"width: 696px\" src=\"\/\/www.fastwebhost.in\/blog\/wp-content\/uploads\/2017\/04\/FourthRowMemorySwap.png\" width=\"696\" height=\"157\" data-attachment-id=\"2324\"><\/span><\/p>\n<p>This rows will provide you the information about the RAM usage. It shows you total memory in use, free, buffers cached.<\/p>\n<h2>Sixth Row : Processes List<\/h2>\n<p><span><img loading=\"lazy\" decoding=\"async\" alt=\"Processes List\" style=\"width: 1003px;\" src=\"\/\/www.fastwebhost.in\/blog\/wp-content\/uploads\/2017\/04\/ProcessesLists.png\" width=\"696\" height=\"177\" data-attachment-id=\"2330\"><\/span><\/p>\n<p>There is a last row to discuss CPU usage which were running currently.&nbsp;Let\u2019s see what information we can observe in the different columns.<\/p>\n<ul>\n<li>\n<p>PID \u2013 ID of the process(819328)<\/p>\n<\/li>\n<li>\n<p>USER \u2013 The user that is the owner of the process (root)<\/p>\n<\/li>\n<li>\n<p>PR \u2013 priority of the process (20)<\/p>\n<\/li>\n<li>\n<p>NI \u2013 The \u201cNICE\u201d value of the process (0)<\/p>\n<\/li>\n<li>\n<p>VIRT \u2013 virtual memory used by the process (3423m)<\/p>\n<\/li>\n<li>\n<p>RES \u2013 physical memory used from the process (3.3g)<\/p>\n<\/li>\n<li>\n<p>SHR \u2013 shared memory of the process (1788)<\/p>\n<\/li>\n<li>\n<p>S \u2013 indicates the status of the process: S=sleep R=running Z=zombie (S)<\/p>\n<\/li>\n<li>\n<p>%CPU \u2013 This is the percentage of CPU used by this process (65.9)<\/p>\n<\/li>\n<li>\n<p>%MEM \u2013 This is the percentage of RAM used by the process (5.2)<\/p>\n<\/li>\n<li>\n<p>TIME+ \u2013This is the total time of activity of this process (1363:48)<\/p>\n<\/li>\n<\/ul>\n<ul>\n<li>COMMAND \u2013 And this is the name of the process (exim)<\/li>\n<\/ul>\n<h3>Conclusion<\/h3>\n<p>Now you will able to monitor in detail all the information that the top command displays, it helps you check excessive load, users who consumes more resources, or to know why the system is running slow, memory usage and many more.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u200bTop command is one of the basic command to monitor server processes in Linux. Top command shows all running processes in the server. It shows you the system information and the processes information just like up-time, average load, tasks running, no. of users logged in, no. of CPU processes, RAM utilisation and it lists all [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":2371,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[22],"tags":[115],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/posts\/2310"}],"collection":[{"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/comments?post=2310"}],"version-history":[{"count":3,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/posts\/2310\/revisions"}],"predecessor-version":[{"id":4699,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/posts\/2310\/revisions\/4699"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/media\/2371"}],"wp:attachment":[{"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/media?parent=2310"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/categories?post=2310"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fastwebhost.in\/blog\/wp-json\/wp\/v2\/tags?post=2310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}