[libvirt-users] Libvirt Java API to get CPU usage of VM (KVM)

Restituto Marcus Arevalo marcusarevalo at yahoo.com
Tue Aug 12 17:52:58 UTC 2014


Hi all libvirt-users,


Is there a counterpart on Java of the function virDomainGetCPUStats that is based on C API? Because I am trying to create a program based on 
java to get the CPU usage of a Guest/Domain/VM in KVM using the Libvirt 
Java API. 


Honestly, I am having a hard time in starting my program. I have no 
idea where to start. I mean, what functions do I need to get the CPU 
usage of the guest/domain in KVM? I know there are other options but I 
am avoiding in connecting to the VM through SSH and get the CPU usage. 
To make things easier to understand, I need to know how the Virtual 
Machine Manager in Linux is able to output a graph of the CPU usage of 
EACH VM. 
I really need help. I have no idea where to start. Any suggestions 
would be much appreciated. I'll try to post a screenshot of the graph 
later. 


regards,

Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20140812/1e575fe9/attachment.htm>


More information about the libvirt-users mailing list