Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a machine with Intel(R) Xeon(R) CPU E5520 visible as 16 logical cores (8 with HT). If I run something to eat CPU time (single threaded) top correctly reports 100% CPU usage for the process but only around 3-4% total usage.

Cpu(s):  3.6%us,  0.0%sy,  0.0%ni, 96.4%id,  0.0%wa,  0.0%hi,  0.0%si,  0.1%st

 1567 www       20   0 65632   84    4 R  100  0.0   0:05.96 burnMMX

Surely the reported usage should be ~6.25% (1 of 16 cores).

  • Is it incorrect because it's a virtual machine?
  • How could I calculate a correct value?
share|improve this question

migrated from serverfault.com Jan 17 '12 at 18:57

This question came from our site for system and network administrators.

you may try atop and change the top to report usage of each CPU individually (by pressing 1) – Hubert Kario Jan 7 '12 at 15:07
@HubertKario the usage reported for each core is correct so why then is the total wrong? – Yotaware Jan 7 '12 at 15:09
If the usage levels of individual cores are correct then this would suggest a bug in top as unlikely as it sounds... – Hubert Kario Jan 7 '12 at 15:12
This would not be the first post about incorrect top results in VMs. Can you describe your VM-technology and your host and guest operating systems? – Nils Jan 7 '12 at 20:57
@Nils Xen with an Ubuntu/2.6.32-21-server guest. No information about the host OS. – Yotaware Jan 7 '12 at 21:20

top in the summary reports usage relative to the CPU with all cores added up. On the other hand, when you look in the list of processes, top reports percent referenced to one core (real or HT). Try running a process with 4 threads that can eat up 4 CPU cores, you will find it using 400% CPU.

I can't tell why, but that's how top works on all Linux system I've seen.

share|improve this answer

Most often top works in 'Irix' mode by default, just as you describe it. If you want to obtain a percentage of the total CPU capabilities (i.e. when the sum of the possible CPU usage adds up to 100% and not cpu_cores_number * 100%), just toggle the 'Irix' mode by pressing I.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.