Re: How i can calculate cpu utilization percentage for domain running under a host using libvirt API.

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

 



[long subject line!]

On 05/23/2014 01:19 AM, deepak@xxxxxxxxxxxxxx wrote:
> How i can calculate cpu utilization percentage for domain running under a
> host using libvirt API.
> Which function can i use for calulating cpu percentage?

You have to calculate the percentage utilization yourself by making
repeated queries to the cpu status calls, and tracking how the
cumulative usage grows over time.  You may want to look at the source
code of virt-top for ideas on how to do it.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

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

  Powered by Linux