At Wed, 12 Mar 2014 13:36:50 +0100,
Pasquale Dir wrote:
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...,
virDomainMemoryStatPtr<http://libvirt.org/html/libvirt-libvirt.html#vi...,
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).
The information available depends on the kind of hypervisor you're
using and which guest OS you have.
I guess you're using qemu. Which version are you using?
What guest OS do you use? Which version?
What's the version number of the balloon driver inside your guest?
[ideally, you should always provide at least the hypervisor and guest
OS information without us having to ask you]