Measuring CPU %steal on VMware and Hyper-V hypervisors
The only way to get these (and more) performance counters inside a VMware guest, is by using the VMGuestLib SDK as shipped with the vmware-tools.
I wrote a python wrapper for this library, called python-vmguestlib and a tool vmguest-stats to get access to these counters. And there are now three Dstat plugins to correlate these performance counters with other system resources. It is as simple as:
dstat -c –vm-cpu -m –vm-mem –vm-mem-adv
You can find the python wrapper, the vmguest-stats tool and Dstat at:
Feedback and improvements welcomed !
Related videos on Youtube
Yolo Perdiem
Updated on September 18, 2022Comments
-
Yolo Perdiem over 1 year
For Xen Linux guests,
%steal
time is readily available via top and other utilities.Is it possible to get this and related metrics from within a Linux guest when running a non-Xen hypervisor such as ESXi or Hyper-V?
For Windows guests, both VMware and Microsoft provide perfmon counters. Example:
But these don't seem to be exposed via vanilla
top
in Centos 6.4.-
slm over 10 yearsSee this Q&A from SF: serverfault.com/questions/392216/…. Read Ryan's answer for details on the hypervisors support.
-
Yolo Perdiem over 10 yearsIt's a great answer and I contributed an update but my question above is intended to be much more narrow: Linux guest, standard tools, two specific hypervisors.
-
slm over 10 yearsCheck the command
mpstat -P ALL
as well. It too reports%steal
.
-
-
Paul M almost 8 yearsHmm, sometimes my script prints 140; so I must have misunderstood the units in Dag's program? My VM has four cores, so perhaps the CPU steal could go to 400%, if it's measuring one core at 100%?
-
Andy Smith about 7 years
–vm-cpu
no longer appears to be available with this tool -
Dag Wieers about 7 yearsAndy, did you install the plugins, because the options are tight to the availability of the plugins. github.com/dagwieers/dstat/blob/master/plugins/dstat_vm_cpu.py
-
Andy Smith about 7 yearsAah, I did not, I installed using my OS (CentOS 7) package manager. Thanks
-
tomer.z about 6 yearsIm trying to use this library from open vm tools in my ubuntu installed on vmware workstation 12 but im getting an error not enabled when calling UpdateInfo, did you encounter this problem?