[libvirt] virDomainMemoryStats call

Hi, 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 VIR_DOMAIN_MEMORY_STAT_UNUSED, VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON,VIR_DOMAIN_MEMORY_STAT_AVAILABLE , VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT and VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT. The version of libvirt 0.9.11 on Fedora 16 . How to get all the counters filled up ? Should I take a specific version of qemu or should I do some config settings so that these values are filled up ? P.S. Please copy me in reply Regards, Navin Parakkal HP Software

On 2012年07月18日 15:00, Parakkal, Navin S wrote:
Hi,
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
VIR_DOMAIN_MEMORY_STAT_UNUSED, VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON,VIR_DOMAIN_MEMORY_STAT_AVAILABLE , VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT and VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT.
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. The version of libvirt 0.9.11 on
Fedora 16 . How to get all the counters filled up ? Should I take a specific version of qemu or should I do some config settings so that these values are filled up ?
P.S. Please copy me in reply
Regards,
Navin Parakkal
HP Software
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

+++ Osier Yang [18/07/12 16:13 +0800]:
On 2012年07月18日 15:00, Parakkal, Navin S wrote:
Hi,
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
VIR_DOMAIN_MEMORY_STAT_UNUSED, VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON,VIR_DOMAIN_MEMORY_STAT_AVAILABLE , VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT and VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT.
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 ?
The version of libvirt 0.9.11 on
Fedora 16 . How to get all the counters filled up ? Should I take a specific version of qemu or should I do some config settings so that these values are filled up ?
P.S. Please copy me in reply
Regards,
Navin Parakkal
HP Software
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

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:
Hi,
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
VIR_DOMAIN_MEMORY_STAT_UNUSED, VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON,VIR_DOMAIN_MEMORY_STAT_AVAILABLE , VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT and VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT.
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 "query_balloon": 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 07b0403dfc2b2ac179ae5b48105096cc2d03375a. 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". Regards, Osier
participants (3)
-
Navin P
-
Osier Yang
-
Parakkal, Navin S