[libvirt] FW: CPU Usage and Memory Usage for VM and Host

Kumar R, Prashanth (Prashanth) pkumarr at avaya.com
Fri Jun 19 12:32:31 UTC 2015


Hi All,

I would like to know if there is a way to fetch the "CPU Usage and Memory Usage for VM "  and CPU Usage and Memory Usage for a Host in the KVM environment using libvirt java sdk .
I am using libvirt-0.5.1.jar.
This is the maximum Information I could fetch using the libvirt java API.:
________________________________
vmname:flow-cluster1
state:VIR_DOMAIN_RUNNING
ostype:hvm
guest id :8f0b96e5-1e08-40ce-aea1-9985d80fcabb
Max memory : 8388608
Max cpus : 4
Guest Info-cputime: 58930890000000
Guest Info-maxMem: 8388608
Guest Info-memory: 8388608
Guest Info-nrVirtCpu: 4
MemoryStatistic: 8388608
Autostart :false
________________________________
I tried looking into the libvirt java sdk but did not find any methods to fetch the exact  CPU Usage percentage and Memory Usage percentage for a VM and Host.

Can you please provide me with the java example if possible.

Thanks,
Prashanth R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150619/0c91b7ff/attachment-0001.htm>


More information about the libvir-list mailing list