Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 ?

share|improve this question

4 Answers 4

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.

share|improve this answer
    
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. –  Jason Antman Jan 30 '12 at 21:11

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 !

share|improve this answer

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.

share|improve this answer
    
Wow, nice find! I gotta go play with that. –  Brent Ozar Feb 5 '10 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? –  Gennady Vanin Геннадий Ванин Dec 20 '13 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 '13 at 10:45

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.