Re: getting CPU usage through virsh command or libvirt API

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

 



On 06.07.2014 19:00, Restituto Marcus Arevalo wrote:
Hi,


     Is it possible to get the CPU usage of a guest through a virsh
command? I have tried almost all the commands (vcpuinfo, cpu-stats,
etc.) that gets the details of a guest cpu, but it only returns the cpu
time. Is there any command that returns the cpu usage (just like the
graph that virt-manager displays) of a guest? Or do I have to create a
program using libvirt API? Thanks in advance.

As I replied in your previous e-mail, libvirt doesn't expose this kind of information. It's the best if client computes the value it needs from the information libvirt provides.

Having said that, virt-top[1] may serve as good example, although it's written in OCaml, not C.

Michal

1: http://people.redhat.com/~rjones/virt-top/

_______________________________________________
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