I'm trying to use VMware Perl SDK to fetch the real-time value of the deviceLatency counter. This counter is available only as a real-time counter, and its value is not stored in the VC database.
I tried tweaking the viperformance.pl script, and did not succeed. The VMware SDK documentation states that "normally, QueryPerf will return performance statistics
stored in the VirtualCenter database". I can get QueryPerf to retrieve real-time value for historical counters, but not for counters available only as real-time.
ESX version is ESX3.5i. Does anybody have a code example of how to do it ?
Take a look at this vSphere SDK for perl script:
It was written against ESX(i) 4.0, have not tested it for VI 3.5, so you would need to test but it should work.
=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at:
VMware Code Central - Scripts/Sample code for Developers and Administrators
If you find this information useful, please award points for "correct" or "helpful".