cpu time totals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

	I'm comparing the cpu usage of a VM from virDomainGetInfo and the
	usages returned per-vcpu from virDomainGetVcpus and the totals do
	not match up. 

	I expect that the cpu usages reported per-vcpu, when summed, should
	equal the total cpu usage of the domain, but there is quite a large
	gap between them. Is there something I'm missing?

	See this example code using the python bindings:

>>> import libvirt
>>> c = libvirt.open('qemu:///system')
>>> d = c.lookupByID(51)
>>> d.info()[4]
111390000000L
>>> d.vcpus()[0]
[(0, 1, 12720000000L, 1), (1, 1, 2980000000L, 0), (2, 1, 3150000000L, 1), (3, 1, 2600000000L, 0)]
>>> sum([vcpu[2] for vcpu in d.vcpus()[0]])
21520000000L
>>> d.info()[4] - sum([vcpu[2] for vcpu in d.vcpus()[0]])
91760000000L

	Why is this additional 91 seconds not reflected in time spent by the
	vcpus? What exactly is the meaning of the cpuTime parameter of the
	virVcpuInfo struct?

Thanks,
--Igor

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux