Restituto Marcus Arevalo
2014-Aug-12 17:52 UTC
[libvirt-users] Libvirt Java API to get CPU usage of VM (KVM)
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
Claudio Bley
2014-Aug-20 19:40 UTC
Re: [libvirt-users] Libvirt Java API to get CPU usage of VM (KVM)
At Tue, 12 Aug 2014 10:52:58 -0700, Restituto Marcus Arevalo wrote:> > Hi all libvirt-users, > > Is there a counterpart on Java of the function virDomainGetCPUStats > that is based on C API?No, not currently. I've prepared a patch some time ago which adds support for that function, but it is based on changes not yet committed to the official git repo. I'm still working on it, but don't hold your breath. -- Claudio