Hi,

I am trying to connect to a server running esx and collect system metrics like cpu usage, network and disk iops. I am able to establish the connection successfully and obtain VM information such as ids, domain names, config xml etc. But I am unable to collect statistics. 

I am using the python interface and if I do , 

conn=libvirt.openAuth(uri, auth, 0)
dom-conn.lookupByID(id) // Where id is the domain id of the vms

netstats=dom.interfaceStats(interface)

gives an error libvirt.libvirtError: this function is not supported by the connection driver: virDomainInterfaceStats

The same goes for block stats. For the cpu, I used,

cpu=dom.info()[4]

but, that always returns 0 (I thought it was cumulative and returns a huge value)

I have used similar scripts with xen and kvm and it worked well. Can someone tell me what mistake I am doing or if the driver doesnt support these functions, is there any other way of getting the stats ?? Thank you. 

-
Regards,
Sethuraman Subbiah

Graduate Student - NC state University
M.S in Computer Science