{"id":1383,"date":"2014-08-15T16:56:35","date_gmt":"2014-08-15T08:56:35","guid":{"rendered":"http:\/\/iswedding.no-ip.com\/wordpress\/?p=1383"},"modified":"2014-08-15T16:56:35","modified_gmt":"2014-08-15T08:56:35","slug":"processes-and-cpu-information-top","status":"publish","type":"post","link":"https:\/\/sampson.synology.me\/?p=1383","title":{"rendered":"Processes and CPU information (top)"},"content":{"rendered":"<h1><span style=\"color: #008000;\"><strong style=\"color: #000000; font-style: normal;\">Linux command &#8220;top&#8221;<\/strong><\/span><\/h1>\n<h2>Tasks information:<\/h2>\n<ul>\n<li>Processes running in totals (73 total)<\/li>\n<li>Processes running (2 running)<\/li>\n<li>Processes sleeping (71 sleeping)<\/li>\n<li>Processes stopped (0 stopped)<\/li>\n<li>Processes waiting to be stoppati from the parent process (0 zombie)<\/li>\n<\/ul>\n<h2>CPU information:<\/h2>\n<ul>\n<li>Percentage of the CPU for user processes (0.3%<strong>us<\/strong>)<\/li>\n<li>Percentage of the CPU for system processes (0.0%<strong>sy<\/strong>)<\/li>\n<li>Percentage of the CPU processes with priority upgrade\u00a0<em>nice<\/em>\u00a0(0.0%<strong>ni<\/strong>)<\/li>\n<li>Percentage of the CPU not used (99,4%<strong>id<\/strong>)<\/li>\n<li>Percentage of the CPU processes waiting for I\/O operations(0.0%<strong>wa<\/strong>)<\/li>\n<li>Percentage of the CPU serving hardware interrupts (0.3%\u00a0<strong>hi<\/strong>\u00a0\u2014 Hardware IRQ<\/li>\n<li>Percentage of the CPU serving software interrupts (0.0%\u00a0<strong>si<\/strong>\u00a0\u2014 Software Interrupts<\/li>\n<li>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%<strong>st<\/strong>\u00a0\u2014 Steal Time)<\/li>\n<\/ul>\n<h2>Processes information:<\/h2>\n<ul>\n<li><strong>PID<\/strong>\u00a0\u2013 l\u2019ID\u00a0of the process(4522)<\/li>\n<li><strong>USER<\/strong>\u00a0\u2013 The user that is the owner of the process (root)<\/li>\n<li><strong>PR<\/strong>\u00a0\u2013 priority of the process (15)<\/li>\n<li><strong>NI<\/strong>\u00a0\u2013 The \u201cNICE\u201d value of the process (0)<\/li>\n<li><strong>VIRT<\/strong>\u00a0\u2013 virtual memory used by the process (132m)<\/li>\n<li><strong>RES<\/strong>\u00a0\u2013 physical memory used from the process (14m)<\/li>\n<li><strong>SHR<\/strong>\u00a0\u2013 shared memory of the process (3204)<\/li>\n<li><strong>S<\/strong>\u00a0\u2013 indicates the status of the process:\u00a0<strong>S<\/strong>=sleep\u00a0<strong>R<\/strong>=running\u00a0<strong>Z<\/strong>=zombie (S)<\/li>\n<li><strong>%CPU<\/strong>\u00a0\u2013 This is the percentage of CPU used by this process (0.3)<\/li>\n<li><strong>%MEM<\/strong>\u00a0\u2013 This is the percentage of RAM used by the process (0.7)<\/li>\n<li><strong>TIME+<\/strong>\u00a0\u2013This is the total time of activity of this process (0:17.75)<\/li>\n<li><strong>COMMAND<\/strong>\u00a0\u2013 And this is the name of the process (bb_monitor.pl)<\/li>\n<\/ul>\n<h2>Useful commands:<\/h2>\n<ul>\n<li>k \u2013 Allows you to \u201ckill\u201d a process providing his pid<\/li>\n<li>r \u2013 This allows you to renice a process providing his pid<\/li>\n<li>u \u2013 This will display only the processes of a user<\/li>\n<li>F \u2013 Select sort field<\/li>\n<\/ul>\n<h4><strong>\u00a0Shortcuts at the time of running top command<\/strong><\/h4>\n<p>l \u2013To display or to hide load average line<br \/>\nt \u2013To display or to hide task\/cpu line<br \/>\n1 \u2013To display or hide all other CPU\u2019s<br \/>\nm \u2013to display or to hide RAM and SWAP details<br \/>\ns \u2013To change the time interval for updating top results(value is in sec\u2019s)<br \/>\nR \u2013To sort by PID number<br \/>\nu \u2014 Press u then username to get only that user process details<br \/>\nP \u2013To sort by CPU utilization<br \/>\nM \u2013To sort by RAM utilization<br \/>\nc \u2013To display or hide command full path<br \/>\nr \u2013To renice a process, press r then the PID no then the renice value to renice a process.<br \/>\nk \u2013To kill a process, press k then PID number then enter to kill a process<br \/>\nw \u2013To save the modified configuration permanently.<br \/>\nq \u2013To quit the top command.<br \/>\nh \u2013for getting help on top command<\/p>\n<h2>For htop:<\/h2>\n<p>Arrow keys \u2013 move around and select a process<\/p>\n<ul>\n<li>F6 \u2013 Choose \u201csort by\u201d<\/li>\n<li>F7 \u2013 Remove priority to selected process (renice)<\/li>\n<li>F8 \u2013 Add priority to selected process<\/li>\n<li>F9 \u2013 Kill the select process<\/li>\n<\/ul>\n<h4><strong>Get the top 10 CPU consuming process<\/strong><\/h4>\n<p>ps aux | sort -n -k 3 | tail -10<\/p>\n<h4><strong>Get the top 10 memory consuming process<\/strong><\/h4>\n<p>ps aux | sort -n -k 4 | tail -10<br \/>\nReference:<\/p>\n<ul>\n<li>http:\/\/linuxaria.com\/howto\/understanding-the-top-command-on-linux<\/li>\n<li>http:\/\/linuxaria.com\/article\/monitoring-process-top-htop?lang=en<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Linux command &#8220;top&#8221; Tasks information: Processes running in totals (73 total) Processes running (2 running) Processes sleeping (71 sleeping) Processes stopped (0 stopped) Processes waiting to be stoppati from the parent process (0 zombie) CPU information: Percentage of the CPU for user processes (0.3%us) Percentage of the CPU for system processes (0.0%sy) Percentage of the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/sampson.synology.me\/?p=1383\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Processes and CPU information (top)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,16],"tags":[71,82],"class_list":["post-1383","post","type-post","status-publish","format-standard","hentry","category-interest","category-it-info","tag-hi-fi","tag-linux"],"_links":{"self":[{"href":"https:\/\/sampson.synology.me\/index.php?rest_route=\/wp\/v2\/posts\/1383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sampson.synology.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sampson.synology.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sampson.synology.me\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sampson.synology.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1383"}],"version-history":[{"count":0,"href":"https:\/\/sampson.synology.me\/index.php?rest_route=\/wp\/v2\/posts\/1383\/revisions"}],"wp:attachment":[{"href":"https:\/\/sampson.synology.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sampson.synology.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sampson.synology.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}