[libvirt-users] problem when get the vm cpu stat

Wangkai (Kevin,C) wangkai86 at huawei.com
Fri Apr 19 07:40:09 UTC 2013


Hi all,

I try to get vm cpu stat by function "virDomainGetCPUStats",  when the vm

Cpu usage is 100%, I can see from the vm shell by "top",  when the info

Get by the "virDomainGetCPUStats" show only the "cpu_time" increased,

"user_time" and "system_time" was not changed at all.

Is that correct ? How can I get the vm cpu usage?

nparams = virDomainGetCPUStats(domain, NULL, 0, -1, 1, 0);
virDomainGetCPUStats(domain, params, nparams, -1, 1, 0);

Thanks,
Kevin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130419/1d4642f8/attachment.htm>


More information about the libvirt-users mailing list