Parakkal, Navin S
2012-Aug-09 17:13 UTC
[libvirt-users] [libvirt] virDomainMemoryStats call
Hi, Is the array mstats returned by virDomainMemoryStats call cummulative or snapshot of the counter at that particular time ? I was of the opinion that is cummulative like the /proc counters but this counter seems to go backwards ie next snapshot value is less than the current one which makes me think these are snapshot values . I'm using RHEL 6.3 libvirt version 0.9.10. Regards, Navin
On 08/09/2012 11:13 AM, Parakkal, Navin S wrote:> Hi, > Is the array mstats returned by virDomainMemoryStats call cummulative or snapshot of the counter at that particular time ? I was of the opinion that is cummulative like the /proc counters but this counter seems to go backwards ie next snapshot value is less than the current one which makes me think these are snapshot values . I'm using RHEL 6.3 libvirt version 0.9.10.For qemu, virDomainMemoryStats parses the output of the qemu 'query-balloon' monitor command; I'd have to check the qemu source code to see if these stats are cumulative, but that's what I'd expect. If they are not, then libvirt has a bug for not accumulating the stats locally, because I think the libvirt API has to be cumulative. If reading the stats resets them to 0 (ie. stats are a self-resetting snapshot), and you have more than one client both trying to read stats, then the stats will read short. -- Eric Blake eblake at redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 620 bytes Desc: OpenPGP digital signature URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120809/8cda126f/attachment.sig>