CPU usage exceeding 100% in top command third line

top screenshot

As seen in the above image, if you sum all the values in the third line it exceeds 100%, giving 100.1%:

%Cpu(s): 18.3 us, 21.9 sy, 0.0 ni, 59.6, 0.3 wa, 0.0 hi, 0.0 si, 0.0 st

18.3 + 21.9 + 59.6 + 0.3 = 100.1

Can anyone explain the meaning of the 3rd line of top's output?

Upvotes: 3

Views: 9085

Answers (2)

Anugraha Sinha
Anugraha Sinha

Reputation: 660

Edit

The question asked above is for the net CPU consumption shown in the 3rd line of top output. The total sum of %CPU consumption in the 3rd line will definitely be equal to 100%. There is rounding off done for calculating individual elements, us, id, wa, sys, etc. In this particular case, it is just a matter of round off that it is reaching 100.1%

Below information is for the column of %CPU consumption of individual processes.

This depends on the number of cores that you have on your system. Every core would give you a 100% value. Therefore, if you have 4 cores, that means the total of %CPU can go up to 400%.

What do you really mean by cores?

grep processor /proc/cpuinfo | wc -l

This will give you the number of CPUs you have. From a logical point of view (as an example Intel Core i5-3570, this could be understood from cpuinfo information also)

[root@localhost ~] egrep "processor|core id|physical id" /proc/cpuinfo
processor       : 0
physical id     : 0
core id         : 0
processor       : 1
physical id     : 0
core id         : 1
processor       : 2
physical id     : 0
core id         : 2
processor       : 3
physical id     : 0
core id         : 3

In this there are Physical Processors = 1

Number of cores on physical processor = 4

Number of virtual cores per physical core = None

Therefore total CPUs = 4

If there were virtual cores (such as those on Xeon processors) you would more processors.

Upvotes: 4

Hackerman
Hackerman

Reputation: 12305

Row three shows the cpu utilization status on server, you can find here how much cpu is free and how much is utilizing by system:

enter image description here

Upvotes: 1

Related Questions