4

I was wondering if there is any tools that can be used inside of a VM and is aware of working in virtualized environment. It can be little misleading using Linux top tool without regarding limits of CPU and memory setting. Maybe some interesting data can be gatherer with VMTools assist ?

4 Answers 4

3

The only way to get these (and more) performance counters from 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 !

1

No, as of right now, the host performance is not available from the guest.

If you're going to do performance monitoring, you're going to want three statistics:

  • The host's max (like how fast the CPUs can go)
  • The needs of other guests (how many other guests are using CPU, and how much)
  • The limit of your guest (because the VMware admin can throttle your CPU down by setting limits)

Some parts of those are available at the guest level (like the host's CPU speeds) but not the other statistics.

1
  • VMWare ESX host performance counters are exposed to Windows guests through Performance Monitor (via VMWare Tools), and are exposed to Linux guests in the VMWare Tools API, though I don't know of any software to monitor it. Jan 30, 2012 at 21:11
1

There is a Perfmon extension that VMware have made available that gives a Windows Guest OS visibility to the ESX Host performance counters - you can read about it in this blog post by VMware's Scott Drummond here.

The comments state that there is no equivalent for Linux available yet but if you have a developer handy the Guest SDK could be used to provide the same data within a Linux Guest.

3
  • Wow, nice find! I gotta go play with that.
    – Brent Ozar
    Feb 5, 2010 at 11:54
  • Could you possibly update the link to your reference to "blog post by VMware's Scott Drummond" as it is currrently broken? Dec 20, 2013 at 8:32
  • Not sure why the link rotted but there is an updated version in the communities site that I've updated the link to point to.
    – Helvick
    Dec 20, 2013 at 10:45
0

The whole point of a virtualized machine is that it's not aware that it's a virtualized machine. The hypervisors job is to abstract the underlying hardware completely away from the VM, giving the VM the impression that it is running on physical hardware. We as users (think Tron) are aware that the machine is a VM, but the kernel of the VM (aside from some optimizations specifically geared towards running as a VM) is not aware of the fact that it's a slice.

That being said it may be possible to SNMP poll the HV (this would probably be the gateway address for typical VMs) for certain tid-bits of information regarding the HV and extrapolate that. Unfortunately I don't have access to a hypervisor that I can snmpwalk so I have no way to see what's available.

You must log in to answer this question.