[libvirt-users] Problem in getting memory statistics

Pasquale Dir phate867 at gmail.com
Wed Mar 12 12:36:50 UTC 2014


Hello,
I need to get how much memory is used by a guest system, in order to
implement some monitoring function which tells me if the system is
overstressed.

I am currently using java apis and the binding which was suggested to me was
Domain.memoryStats();

This is a binding to  int virDomainMemoryStats
(virDomainPtr<http://libvirt.org/html/libvirt-libvirt.html#virDomainPtr>dom,
virDomainMemoryStatPtr<http://libvirt.org/html/libvirt-libvirt.html#virDomainMemoryStatPtr>stats,
 unsigned int nr_stats, unsigned int flags).

Problem is that it returns me just tags 0,6 and 7.
Looking at the documentation I see they are not what I am looking for...I
would rather need 4 (VIR_DOMAIN_MEMORY_STAT_UNUSED) and 5
(VIR_DOMAIN_MEMORY_STAT_AVAILABLE).

Is there a way to set them?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20140312/e3848094/attachment.htm>


More information about the libvirt-users mailing list