What does cpu_time returned by virDomainGetCPUStats mean?

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

hi, everyone.

    I find an 'interesting' thing involving virDomainGetCPUStats(). I
call it for cpu usage consumed by a domain and get a array of
virTypedParameter. My system is 2-core and hyperviser return 1
parameter per cpu. So the contents of the array is like this.
        .fiedl = "cpu_time"
        .type = 4
        .value.ul = 51640610899
        .field = "cpu_time"
        .type = 4
        .value.ul = 55302820304

   I thought this value store the run time of the cpu since last boot.
But I find I was wrong because this value would increase until it
wraps down and doesn't reset even the domain is restarted.

   So, what does this value mean?

   How can I get the CPU usage of the domain?

   I found nothing on the API reference doc page:-(. No word is
related with the meaning of the returned array of virTypedParameter by

libvirt-users mailing list

[Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

Powered by Linux

  Web www.spinics.net