[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt-users] [libvirt] virDomainMemoryStats call

On 2012年07月18日 17:34, Navin P wrote:
+++ Osier Yang [18/07/12 16:13 +0800]:
On 2012年07月18日 15:00, Parakkal, Navin S wrote:

I’m using the API virDomainMemoryStats to fetch memory stats for a
domain/guest on Fedora 16/RHEL 6.3 . I don’t get these counters filled up


These fields are supported by libvirt, but unfortunately qemu has
disabled them for monitor command query-ballon for a critical bug,
it has been for a long time. I'm not clear about how the current
status is, though I guess it's still not enabled.

Is that only for the VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON or for all the
counters ? Should i ask about the monitor command query-balloon on the qemu
list ? Do you have details of the critical bug ?

All the others are disabled except "actual". See qemu commit
07b0403dfc2b2 for more details. We might have bug if can't even
get 'actual', because your libvirt version is new enough to include
the libvirt commit:

commit 41514f7b3e4eaa18a98976c05fab771fec4ded18
Author: Osier Yang <jyang redhat com>
Date:   Tue Jun 14 11:21:35 2011 +0800

    qemu: Parse current balloon value returned by query_balloon

    Qemu once supported following memory stats which will returned by

        stat_put(dict, "actual", actual);
stat_put(dict, "mem_swapped_in", dev->stats[VIRTIO_BALLOON_S_SWAP_IN]); stat_put(dict, "mem_swapped_out", dev->stats[VIRTIO_BALLOON_S_SWAP_OUT]); stat_put(dict, "major_page_faults", dev->stats[VIRTIO_BALLOON_S_MAJFLT]); stat_put(dict, "minor_page_faults", dev->stats[VIRTIO_BALLOON_S_MINFLT]);
        stat_put(dict, "free_mem", dev->stats[VIRTIO_BALLOON_S_MEMFREE]);
        stat_put(dict, "total_mem", dev->stats[VIRTIO_BALLOON_S_MEMTOT]);

    But it later disabled all the stats except "actual" by commit

    libvirt doesn't parse "actual", so user will always see a empty result
    with "virsh dommemstat $domain". Even qemu haven't disabled the stats,
    we should support parsing "actual".


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]