[libvirt-users] How to use "virDomainMemoryStats"? I got 0 result.

Eric Blake eblake at redhat.com
Thu Jan 19 20:30:01 UTC 2012

On 01/17/2012 08:36 PM, mao weijie wrote:
> I use like this;
> int n = virDomainMemoryStats(dom, stats, 4, 0);
> I want to get men used and not used. If can , I want to get all output in stats.
> but "n" result is always 0.

That is the correct usage, and the fact that the answer is 0 is a
byproduct of qemu not being able to provide the information.  There are
patches under way so that qemu 1.1 will be able to provide statistics;
but until then, there's nothing libvirt can do if qemu doesn't provide
the information.

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/20120119/a92916e3/attachment.sig>

More information about the libvirt-users mailing list