[libvirt] virDomainMemoryStats call

Eric Blake eblake at redhat.com
Thu Aug 9 17:41:28 UTC 2012


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/libvir-list/attachments/20120809/8cda126f/attachment-0001.sig>


More information about the libvir-list mailing list