Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do top %cpu abbreviations mean?

Does anyone know what the 2-letter abbreviations mean in the %CPU line in the header above the top table of processes? Here's a sample output from running top.

top - 15:10:34 up 8 days,  5:11,  1 user,  load average: 0.10, 3.80, 26.82 Tasks:   1 total,   0 running,   1 sleeping,   0 stopped,   0 zombie %Cpu(s):  0.3 us,  0.7 sy,  0.0 ni, 98.0 id,  1.1 wa,  0.0 hi,  0.0 si,  0.0 st KiB Mem:   2051456 total,   623544 used,  1427912 free,     1292 buffers KiB Swap:  3203068 total,   147188 used,  3055880 free,    38352 cached 

Here are my guesses and the ones I don't know.

us = user sy = system ni = ? id = idle? wa = ? hi = ? si = ? st = ? 
like image 453
Ray N. Franklin Avatar asked Sep 23 '14 20:09

Ray N. Franklin


People also ask

What does %CPU in top command mean?

2. The CPU Usage percentage in top is relative per core. For example, if a program was running at full capacity on each core in a quad-core machine, the program would be reported as 400% in top . In this case, qemu was using a sum of 133% of one core's computation power.

How do you read top command results?

Top's first line, top, shows the same information as the uptime command. The first value is the system time. The second value represents how long the system has been up and running, while the third value indicates the current number of users on the system. The final values are the load average for the system.

What is US and Sy in top command?

us - Time spent in user space. sy - Time spent in kernel space.

What is PR and Ni in top command?

NI (Nice Value): Also depicts the priority of the task. The difference between PR and NI is that PR is the real priority of a process as seen by the kernel, while NI is just a priority hint for the kernel. A negative nice value means higher priority, whereas a positive nice value means lower priority.


1 Answers

In "top" what are us, sy, ni, id, wa, hi, si and st (for CPU usage)?

  • us - user cpu time (or) % CPU time spent in user space
  • sy - system cpu time (or) % CPU time spent in kernel space
  • ni - user nice cpu time (or) % CPU time spent on low priority processes
  • id - idle cpu time (or) % CPU time spent idle
  • wa - io wait cpu time (or) % CPU time spent in wait (on disk)
  • hi - hardware irq (or) % CPU time spent servicing/handling hardware interrupts
  • si - software irq (or) % CPU time spent servicing/handling software interrupts
  • st - steal time % CPU time in involuntary wait by virtual cpu while hypervisor is servicing another processor (or) % CPU time stolen from a virtual machine

Source: In Linux "top" command what are us, sy, ni, id, wa, hi, si and st (for CPU usage)?

like image 134
DavidPostill Avatar answered Sep 20 '22 02:09

DavidPostill