]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
Add capability to fetch balloon stats
authorJohn Ferlan <jferlan@redhat.com>
Thu, 11 Jul 2013 23:18:48 +0000 (19:18 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 16 Jul 2013 12:44:52 +0000 (08:44 -0400)
commitab600621170985b580af438efd1fd049de39b054
treecea44953b0ab9f5e90a5bdfac0bf891079680a0c
parentffdf82a9daf861499f0433542a2058fc44058d69
Add capability to fetch balloon stats

This patch will add the qemuMonitorJSONGetMemoryStats() to execute a
"guest-stats" on the balloonpath using "get-qom" replacing the former
mechanism which looked through the "query-ballon" returned data for
the fields.  The "query-balloon" code only returns 'actual' memory.
Rather than duplicating the existing code, have the JSON API use the
GetBalloonInfo API.

A check in the qemuMonitorGetMemoryStats() will be made to ensure the
balloon driver path has been set.  Since the underlying JSON code can
return data not associated with the balloon driver, we don't fail on
a failure to get the balloonpath.  Of course since we've made the check,
we can then set the ballooninit flag.  Getting the path here is primarily
due to the process reconnect path which doesn't attempt to set the
collection period.
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h