General CPU Usage - Multi-Core System

I use xen and xen top I get the total CPU usage as a percentage:

  NAME STATE CPU(sec) CPU(%) MEM(k) MEM(%) MAXMEM(k) MAXMEM(%) VCPUS NETS NETTX(k) NETRX(k) VBDS VBD_OO VBD_RD VBD_WR VBD_RSECT VBD_WSECT SSID VM1 -----r 25724 299.4 3025244 12.0 20975616 83.4 12 1 14970253 27308358 1 3 146585 92257 10835706 9976308 0 

As you can see above, I see that the processor utilization is 299%, but how can I get the total CPU usage from the virtual machine? Top does not show general usage.

+5
source share
1 answer

Usually we see a 100% processor per core. I think there are at least 3 cores / processor.

try counting the kernels:

 grep processor /proc/cpuinfo | wc -l 

299% - total processor utilization.

sar and mpstat are often used to display cpu system usage. Verify that the systat package systat installed and displays the total processor usage with:

 $ mpstat 1 1 Linux 2.6.32-5-amd64 (debian) 05/01/2016 _x86_64_ (8 CPU) 07:48:51 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle 07:48:52 PM all 0.12 0.00 0.50 0.00 0.00 0.00 0.00 0.00 99.38 Average: all 0.12 0.00 0.50 0.00 0.00 0.00 0.00 0.00 99.38 

If you agree that CPU usage (100% IDLE):

 $ mpstat 1 1 | awk '/^Average/ {print 100-$NF,"%"}' 0.52 % 
+4
source

All Articles