Re: [libvirt] Can not get domain's cpu time

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

 



Zhang Qian wrote:
Hi,

I have a domain running in my KVM box, and try to get its vcpu info by
calling virDomainGetVcpus(), but it seems the cpu time returned to me
is always 0.

And I also found virsh can not get the CPU time too:
$ virsh vcpuinfo aaa
    VCPU:           0
    CPU:            0
    State:          running
    CPU Affinity:   yy

I tried the same virsh command in my Xen box for a running domain, the
output is:
$ virsh vcpuinfo test1
    VCPU:           0
    CPU:            1
    State:          running
    CPU time:       322.1s  <----- I need this
    CPU Affinity:   yy

As you see, for KVM domain, there is no "CPU time".
But it's very strange that virt-manager can show the right CPU usage
for my running domain, I do not know where virt-manger gets it.

Can anyone tell me which libvirt API should I call to get the CPU time? Thanks!


Regards,
Qian

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list
virDomainGetVcpus() is NOT supported by KVM

For driver support status, please refer to http://libvirt.org/hvsupport.html

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]