Re: how virt-manager gets CPU usage of Guest

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

 



On 13.08.2014 16:00, Restituto Marcus Arevalo wrote:
Hi,

Does anybody know how virt-manager is getting the CPU usage of the
guests? I need to know how to get the CPU usage of the guests and this
is the only way I can think of. In other words, how does virt-manager
produce the graph of the CPU usage of EACH guest in KVM? I don't
actually need the graph, I just need to get the percentage(%) since I'm
trying to create a Java program to get the CPU usage of each guest in KVM.

This is exactly the question which keeps popping up over and over again. So I've written a small demo program which does exactly what you need:

http://libvirt.org/git/?p=libvirt.git;a=blob;f=examples/domtop/domtop.c;h=e50988ed27bdb07702ef437e53eabadb27afe041;hb=HEAD

Have fun with it!

Michal

_______________________________________________
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