{"id":140,"date":"2014-09-04T11:06:46","date_gmt":"2014-09-04T11:06:46","guid":{"rendered":"https:\/\/devopsbuzz.com?p=140"},"modified":"2022-01-03T16:16:34","modified_gmt":"2022-01-03T16:16:34","slug":"unix-top-command","status":"publish","type":"post","link":"https:\/\/devopsbuzz.com\/unix-top-command\/","title":{"rendered":"Unix Top Command Explained (With Examples)"},"content":{"rendered":"\n<p><strong>Unix top command<\/strong> helps you find out most of the system-related stuff which a Unix user needs to know about the system.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top_home.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"395\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top_home.jpg\" alt=\"top - the unix command\" class=\"wp-image-154\" srcset=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top_home.jpg 570w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top_home-300x207.jpg 300w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Top command in Unix helps you to diagnose any system related issue and you can correct the configuration if needed based on the results.<\/p>\n\n\n\n<p>The top program provides a dynamic real-time view of the running system. It displays system summary information as well as a list of tasks currently being managed by the Linux kernel.<\/p>\n\n\n\n<p>Different System summary information is shown and all the information displayed for the tasks are user-configurable and that configuration can be saved and retained across restarts.<\/p>\n\n\n\n<p>In short, you can see the results of all the system related commands like \u201cfree, ps, &nbsp;vmstat, who, w and uptime\u201d just by typing one command, i.e. <b>top<\/b>.<\/p>\n\n\n\n<p>Type \u201c<b>top<\/b>\u201d command on your Unix\/Linux console and it will display all the system\u2019s information like <strong>CPU, memory, swap, running tasks<\/strong> of each process&#8211;all in a single view.<\/p>\n\n\n\n<p>Press \u2018<strong>q<\/strong>\u2018 to quit\/return.<\/p>\n\n\n\n<p>When you start top for the first time, you be presented with the traditional screen elements:<\/p>\n\n\n\n<ol><li>Summary Area<\/li><li>Message\/Prompt Line<\/li><li>Columns Header<\/li><li>Task Area<\/li><\/ol>\n\n\n\n<p>To understand the <strong>top command output<\/strong>, let\u2019s go line by line.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"626\" height=\"361\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top1.png\" alt=\"top unix command example\" class=\"wp-image-143\" srcset=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top1.png 626w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top1-300x173.png 300w\" sizes=\"(max-width: 626px) 100vw, 626px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>The <strong>first line<\/strong> shows:<\/p>\n\n\n\n<p><strong>Current System Time<\/strong> along with the information since when the system is <strong>UP and running. <\/strong><\/p>\n\n\n\n<p><strong>Number of Users <\/strong>who logged in currently to the system.<\/p>\n\n\n\n<p><strong>Load Average on the System<\/strong> at default <strong>1, 5 and 15 minutes<\/strong> intervals.<\/p>\n\n\n\n<p>The<strong> second line <\/strong>shows <strong>Process statistics<\/strong> in below format:<\/p>\n\n\n\n<p>Number of <strong>Tasks <\/strong>currently assigned to the system<\/p>\n\n\n\n<p><strong>Running<\/strong>: Tasks that are currently running on the system.<\/p>\n\n\n\n<p><strong>Sleeping<\/strong>: Tasks that are not active, processes that are blocked as they are waiting for an event e.g. sleep(), time out or I\/O completion.<\/p>\n\n\n\n<p><strong>Stopped<\/strong>: It simply means that the process is &#8220;paused,&#8221; but not &#8220;terminated.&#8221; The most common source of <code>STOP<\/code> signals is the user hitting <code>^z<\/code> while the process is in the foreground. A stopped process will not terminate due to a <code>TERM<\/code> signal until it is continued. It will terminate as soon as it receives a <code>KILL<\/code> signal even the process is stopped.<\/p>\n\n\n\n<p><strong>Zombie<\/strong>: A zombie process is a finished\/died process, it isn\u2019t all removed from memory immediately but it has still occupied an entry in the process table. Usually, a child process that has finished its execution sends a SIGCHLD signal to the parent process which has created it.<\/p>\n\n\n\n<p>Then the parent process sends a wait() system call through which it can read the child\u2019s exit status. After receiving the wait system call, the child\u2019s entry will get removed from the process table.<\/p>\n\n\n\n<p>But in some cases, the parent process may ignore the SIGCHLD signal which actually causes the completed process to still exist in the process table and that makes it a zombie process.<\/p>\n\n\n\n<p>Sometimes this is desirable for the parent process to ensure that it doesn\u2019t allocate the same PID to another child. When a process becomes dead, it just frees up the memory and other resources allocated to it, which means a zombie process will not be using any resources at all, other than an entry in the process table.<\/p>\n\n\n\n<p>However, if zombies are created at a high rate, the entire available PIDs pool will get filled with zombie processes that will prevent other processes from launching.<\/p>\n\n\n\n<p>The <strong>third<\/strong> <strong>line <\/strong>shows <strong>CPU information<\/strong> in below format:<\/p>\n\n\n\n<p><strong>us<\/strong>:&nbsp; Percentage (%) of&nbsp; CPU time spent in user mode<br><strong>sy<\/strong>:&nbsp; Percentage (%) of&nbsp;CPU time spent in kernel mode<\/p>\n\n\n\n<p>Basically, there are two modes, user and kernel mode, %us represents the percentage of time spent on user processes, but when those processes acquire Kernel layer for some tasks such as reading or writing to the hard disk or allocating several kilobytes of RAM then it known as system calls.<\/p>\n\n\n\n<p><strong>ni<\/strong>: Percentage (%) of&nbsp;CPU time spent on low priority processes<br><strong>id<\/strong>:&nbsp;Percentage (%) of&nbsp; CPU time spent idle<br><strong>wa<\/strong>: Percentage (%) of&nbsp; CPU time spent in wait (on disk)<br><strong>hi<\/strong>:&nbsp;Percentage (%) of&nbsp; CPU time spent servicing\/handling hardware interrupts (hardware irq)<br><strong>si<\/strong>:&nbsp;Percentage (%) of&nbsp; CPU time spent servicing\/handling software interrupts (software irq)<br><strong>st<\/strong>:&nbsp;Percentage (%) of&nbsp; CPU time in involuntary wait by virtual CPU while hypervisor is servicing another processor (or) % CPU time stolen from a virtual machine<\/p>\n\n\n\n<p><code>hi<\/code> represents the time spent processing hardware interrupts. Hardware interrupts are generated by hardware devices when they need to send a signal to the CPU.<\/p>\n\n\n\n<p>Whenever long or complex processing is required, these tasks are deferred using a mechanism call <strong><code>softirqs<\/code><\/strong>. These are scheduled independently, can run on any CPU, can even run concurrently. Softirqs are statically allocated at compile-time<\/p>\n\n\n\n<p><code>si<\/code> represents the time spent in these softirqs.<\/p>\n\n\n\n<p>The next two lines show memory details.<\/p>\n\n\n\n<p>The <strong>fourth line <\/strong>shows <strong>Physical Memory information <\/strong>and&nbsp;the <strong><strong>fifth line <\/strong><\/strong>shows <strong><strong>Swap Memory information<\/strong><\/strong>.<\/p>\n\n\n\n<p>Both lines provide you a snapshot of memory being used by various processes.<\/p>\n\n\n\n<p><strong><em>Mem<\/em><\/strong> represents the actual memory (RAM) that is mappable by your Unix\/Linux kernel.&nbsp; It is not just used for user-related data but for kernel data as well. Kernal permanently reserves a small chunk of memory for itself to use at startup which is hidden to the user.<\/p>\n\n\n\n<p><em><strong>Swap<\/strong> <\/em>is used when the amount of physical memory (RAM) is full, when the RAM gets full and the system needs more memory resources, the kernel moves the inactive pages in memory to the swap space. Swap space is created on hard drives, which have a slower access time compared to physical memory.<\/p>\n\n\n\n<p>Following terms are used for both Physical and Swap memories:<\/p>\n\n\n\n<p><strong>Total<\/strong>: Total Memory available in your system<\/p>\n\n\n\n<p><strong>Used<\/strong>: Memory which is being consumed by the system<\/p>\n\n\n\n<p><strong>Free<\/strong>: Free Memory for the system.<\/p>\n\n\n\n<p>where Memory denotes Physical Or Swap memory respectively.<\/p>\n\n\n\n<p>The below terms are a little mystifying, someone takes the wrong assumption that Cache is only for Swap memory because it&#8217;s placed inside the Swap line.<\/p>\n\n\n\n<p>Actually, the simple logic for memory is:<\/p>\n\n\n\n<p><strong>Total<\/strong> = Used + Free<br><strong>Used<\/strong> = buffers+cached<\/p>\n\n\n\n<p><strong>Buffers<\/strong>: It is the size of in-memory block I\/O buffers, they relatively exist for a short span of time. When a kernel accesses the disk to access a file or block the device it increases the buffer size.<\/p>\n\n\n\n<p><b>Cached<\/b>: Cached&nbsp;is the size of the Linux page cache, excluding the memory in the swap cache, which is represented by&nbsp;<b>SwapCached<\/b>&nbsp;(hence the total page cache size is&nbsp;Cached&nbsp;+&nbsp;SwapCached). The cached represents the size of RAM used to cache the content of files being read recently.<\/p>\n\n\n\n<p>For example, whenever you perform the read operation of a file on disk, the data gets loaded and read into memory, then it goes into the page cache.<\/p>\n\n\n\n<p>Once the read operation completes, the kernel will remain with 2 options. The first is just simply throwing the page away since it is not being used and the second is to cache it for future operations.<\/p>\n\n\n\n<p>So when you do another read of the same area in a file, the data will be read directly out of memory and no trip to the disk will be taken as it&#8217;s being loaded from the page cache.<\/p>\n\n\n\n<p>How Cached is different from Buffers?<\/p>\n\n\n\n<p>Buffers size increases when the system accesses the page whereas Cached size increase when the system accessed the page and goes back.<\/p>\n\n\n\n<p>Reading a file from Cache is relatively fast compared to a fresh start.<\/p>\n\n\n\n<p>Now coming to the <strong>Processes Statistics<\/strong>.<\/p>\n\n\n\n<p>&#8220;<strong>top<\/strong>&#8221; provides you below details for the processes:<\/p>\n\n\n\n<p><strong>PID<\/strong>: Process ID of the process, every process has a unique process ID<strong>.<\/strong><\/p>\n\n\n\n<p><strong>USER<\/strong>: It&#8217;s a user name for the owner of each process.<\/p>\n\n\n\n<p><strong>PR<\/strong>: The priority of the task, RT denotes a Real-Time priority class that is used for system processes. PR is the actual priority of the process as viewed by the Linux kernel.<\/p>\n\n\n\n<p>Kernel simply sets the&nbsp;priority&nbsp;+20 from the nice value for normal processes, which means the highest priority nice value receives a kernel priority of 0.<\/p>\n\n\n\n<p>Sometimes you may see the difference in nice value and PR as the process scheduler applies a small gratuity or penalty to interactive or processor-hogging tasks as the kernel can dynamically change the user PR depending on how interactive the process is<strong>.<\/strong><\/p>\n\n\n\n<p><strong>NI: <\/strong>The nice value of the task. A negative nice value means higher priority, whereas a positive nice value means lower priority. Every new process has a nice level 0, but you can override it with the &#8220;nice&#8221; utility. NI ranges from -20 to 19.<\/p>\n\n\n\n<p><strong>VIRT:&nbsp; <\/strong>VERT is the amount of virtual memory used by a process. It refers to the length of the memory area. It includes all code, data and shared libraries plus pages that have been swapped out.<\/p>\n\n\n\n<p>VIRT represents how much memory the program is able to access at the present moment and it doesn&#8217;t mean that this process actually uses that amount of memory. It&#8217;s a combination of both Physical and Swap memory allocated to the process.<\/p>\n\n\n\n<p>RES<strong>: <\/strong>RES is a resident size, which represents non-swapped physical memory a task is using, It tells you how many memory blocks (known as pages) are really allocated and mapped to process address space. Undoubtedly this will virtually always be less than the VIRT size.<\/p>\n\n\n\n<p><strong>SHR: <\/strong>The amount of shared memory used by a task. It simply reflects memory that could be potentially shared with other processes. SHR indicates how much of the VIRT size is actually sharable (memory or libraries).<\/p>\n\n\n\n<p>The actual memory consumption of a process can be calculated RES minus SHR depending on how many shared libraries are used by any given process and other processes using those same libraries.<\/p>\n\n\n\n<p><strong>S<\/strong>: Represents Process Status<\/p>\n\n\n\n<p>The status of the task can be one of:<\/p>\n\n\n\n<p>&#8216;D&#8217; = uninterpretable sleep<br>&#8216;R&#8217; = running<br>&#8216;S&#8217; = sleeping<br>&#8216;T&#8217; = traced or stopped<br>&#8216;Z&#8217; = zombie<\/p>\n\n\n\n<p>** Tasks shown as running should be more properly thought of as &#8216;ready to run&#8217; &#8212; their task_struct is simply represented on the Linux run queue. Even without a true SMP machine, you may see numerous tasks in this state depending on the top&#8217;s delay interval and nice value.<\/p>\n\n\n\n<p><strong>%CPU<\/strong>: Represents the percentage of the timeshares CPU spends running the process. By default, top output is sorted with CPU usage.<\/p>\n\n\n\n<p><strong>%MEM<\/strong>: Represents the percentage of the physical memory of the system which is used by the process.<\/p>\n\n\n\n<p>Please refer above explanations for CPU and MEM stats.<\/p>\n\n\n\n<p><strong>TIME+: <\/strong>total time CPU(s) spent running the process.<\/p>\n\n\n\n<p><strong>COMMAND<\/strong>: command used to initiate the process.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Unix Top Command Examples (With Shortcuts)<\/h2>\n\n\n\n<p>You can use the below shortcuts to <strong>use the &#8220;top&#8221; command more efficiently<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color: #003366;\">Set \u2018Screen Refresh Interval\u2019 [delay in top output] in Top<\/span><\/h3>\n\n\n\n<p><strong>d <\/strong>or<strong> s \u2013<\/strong>To change the time interval for updating top results&nbsp; (value is in sec\u2019s)<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-delay-change.png\"><img loading=\"lazy\" decoding=\"async\" width=\"639\" height=\"192\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-delay-change.png\" alt=\"top-delay-change\" class=\"wp-image-146\" srcset=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-delay-change.png 639w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-delay-change-300x90.png 300w\" sizes=\"(max-width: 639px) 100vw, 639px\" \/><\/a><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color: #003366;\">Show\/Hide lines<\/span><\/h3>\n\n\n\n<p>If you don&#8217;t want to see all information, you can hide the information by using the below shortcuts:<\/p>\n\n\n\n<ul><li><strong>l<\/strong> \u2013To display or to hide load average line<\/li><li><strong>t<\/strong> \u2013To display or to hide task\/cpu line<\/li><li><strong>m<\/strong> \u2013To display or to hide RAM and SWAP details<\/li><li><strong>1 \u2013<\/strong>&#8211; To display or hide all other CPU\u2019s, like<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-cpushow.png\"><img loading=\"lazy\" decoding=\"async\" width=\"689\" height=\"262\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-cpushow.png\" alt=\"top-cpushow\" class=\"wp-image-152\" srcset=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-cpushow.png 689w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-cpushow-300x114.png 300w\" sizes=\"(max-width: 689px) 100vw, 689px\" \/><\/a><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color: #003366;\">Display Specific User Process<\/span><\/h3>\n\n\n\n<p>You can run the top command with option -u to show the user-specific processes only or you could use the shortcut in the &#8220;top&#8221; window.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted lang:sh decode:true\">top -u root<\/pre>\n\n\n\n<p><strong>u <\/strong>\u2014 Press u then username to get only that user process details<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-user-preference.png\"><img loading=\"lazy\" decoding=\"async\" width=\"637\" height=\"183\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-user-preference.png\" alt=\"top-user-preference\" class=\"wp-image-151\" srcset=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-user-preference.png 637w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-user-preference-300x86.png 300w\" sizes=\"(max-width: 637px) 100vw, 637px\" \/><\/a><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color: #003366;\">Sorting the output<\/span><\/h3>\n\n\n\n<p>By default, the top output is sorted with CPU usage. You can change the order with the below shortcuts:<\/p>\n\n\n\n<ul><li><strong>P \u2013<\/strong>To sort by CPU utilization<\/li><li><strong>M \u2013<\/strong>To sort by RAM utilization<\/li><li><strong>R \u2013<\/strong>To sort by PID number, like<\/li><\/ul>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-arrangeinPIDorder.png\"><img loading=\"lazy\" decoding=\"async\" width=\"627\" height=\"376\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-arrangeinPIDorder.png\" alt=\"top-arrangeinPIDorder\" class=\"wp-image-144\" srcset=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-arrangeinPIDorder.png 627w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-arrangeinPIDorder-300x179.png 300w\" sizes=\"(max-width: 627px) 100vw, 627px\" \/><\/a><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color: #003366;\">Kill running process<\/span><\/h3>\n\n\n\n<p><strong>k \u2013<\/strong>To kill a process, press k then PID number then enter to kill a process<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-killpid.png\"><img loading=\"lazy\" decoding=\"async\" width=\"628\" height=\"184\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-killpid.png\" alt=\"top-killpid\" class=\"wp-image-147\" srcset=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-killpid.png 628w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-killpid-300x87.png 300w\" sizes=\"(max-width: 628px) 100vw, 628px\" \/><\/a><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color: #003366;\">Highlight Running Process in Top<\/span><\/h3>\n\n\n\n<p><strong>z &#8211;<\/strong> press \u2018<strong>z<\/strong>\u2018 option to display running process in colour which may help you to identify running process easily.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/09\/top-running-process-in-color.png\"><img loading=\"lazy\" decoding=\"async\" width=\"622\" height=\"220\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/09\/top-running-process-in-color.png\" alt=\"top-running process-in-color\" class=\"wp-image-197\" srcset=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/09\/top-running-process-in-color.png 622w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/09\/top-running-process-in-color-300x106.png 300w\" sizes=\"(max-width: 622px) 100vw, 622px\" \/><\/a><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><span style=\"color: #003366;\">Renice a Process<\/span><\/strong><\/h3>\n\n\n\n<p><strong>r \u2013<\/strong>To renice a process, press r then the PID no then the renice value to renice a process.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-renice.png\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"132\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-renice.png\" alt=\"top-renice\" class=\"wp-image-149\" srcset=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-renice.png 630w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-renice-300x62.png 300w\" sizes=\"(max-width: 630px) 100vw, 630px\" \/><\/a><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color: #003366;\">Show the absolute path of the processes<\/span><\/h3>\n\n\n\n<p><strong>c \u2013<\/strong>To display or hide command full path<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-show-path.png\"><img loading=\"lazy\" decoding=\"async\" width=\"739\" height=\"216\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-show-path.png\" alt=\"top-show-path\" class=\"wp-image-150\" srcset=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-show-path.png 739w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-show-path-300x87.png 300w\" sizes=\"(max-width: 739px) 100vw, 739px\" \/><\/a><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><span style=\"color: #003366;\">Sorting the top output via field letter<\/span><\/h3>\n\n\n\n<p><strong>O<\/strong> &#8211; Press (Shift+O) to Sort field via field letter, for example, press \u2018a\u2018 letter to sort process with PID (Process ID)<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-change-order.png\"><img loading=\"lazy\" decoding=\"async\" width=\"531\" height=\"724\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-change-order.png\" alt=\"top-change-order\" class=\"wp-image-145\" srcset=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-change-order.png 531w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/07\/top-change-order-220x300.png 220w\" sizes=\"(max-width: 531px) 100vw, 531px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Press &#8216;<strong>W<\/strong>&#8216; to save your work for next time.<br>Press \u2018<strong>q<\/strong>\u2018 to quit exit the window.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up: Unix Top Command<\/h2>\n\n\n\n<p>There you have it!<\/p>\n\n\n\n<p>I hope you liked this detailed guide on the <strong>top command in Unix with examples<\/strong>.<\/p>\n\n\n\n<p>Start using this command in your day to day activities to get rid of all process-related issues.<\/p>\n\n\n\n<p>If you have any queries, drop us a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unix top command helps you find out most of the system-related stuff which a Unix user needs to know about the system. Top command in Unix helps you to diagnose any system related issue and you can correct the configuration if needed based on the results. The top program provides a dynamic real-time view of &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/devopsbuzz.com\/unix-top-command\/\"> <span class=\"screen-reader-text\">Unix Top Command Explained (With Examples)<\/span> Read More \u00bb<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[32],"tags":[12,11,8],"featured_image_urls":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":""},"post_excerpt_stackable":"<p>Unix top command helps you find out most of the system-related stuff which a Unix user needs to know about the system. Top command in Unix helps you to diagnose any system related issue and you can correct the configuration if needed based on the results. The top program provides a dynamic real-time view of the running system. It displays system summary information as well as a list of tasks currently being managed by the Linux kernel. Different System summary information is shown and all the information displayed for the tasks are user-configurable and that configuration can be saved and&hellip;<\/p>\n","category_list":"<a href=\"https:\/\/devopsbuzz.com\/topics\/tools\/\" rel=\"category tag\">Tools<\/a>","author_info":{"name":"Ravi Verma","url":"https:\/\/devopsbuzz.com\/author\/ravi-verma\/"},"comments_num":"6 comments","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Ravi Verma","author_link":"https:\/\/devopsbuzz.com\/author\/ravi-verma\/"},"uagb_comment_info":6,"uagb_excerpt":"Unix top command helps you find out most of the system-related stuff which a Unix user needs to know about the system. Top command in Unix helps you to diagnose any system related issue and you can correct the configuration if needed based on the results. The top program provides a dynamic real-time view of&hellip;","_links":{"self":[{"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/posts\/140"}],"collection":[{"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/comments?post=140"}],"version-history":[{"count":43,"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/posts\/140\/revisions"}],"predecessor-version":[{"id":1836,"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/posts\/140\/revisions\/1836"}],"wp:attachment":[{"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/media?parent=140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/categories?post=140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/tags?post=140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}