CPU Steal – Measuring CPU %Steal on VMware and Hyper-V Hypervisors

cpuvirtual machinevirtualizationxen

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:
vmware perfmon

But these don't seem to be exposed via vanilla top in Centos 6.4.

Best Answer

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 !