On Tuesday, 7 March 2017 at 5:33 AM, Marcelo Tosatti wrote:
On Mon, Mar 06, 2017 at 05:50:43PM +0800, Eli Qiao wrote:Add new virsh command line `nodecachestats` to expose the cache usageon a node.Signed-off-by: Eli Qiao <liyong.qiao@intel.com>---src/libvirt_private.syms | 3 ++-src/qemu/qemu_driver.c | 12 ++++++++++src/util/virresctrl.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++src/util/virresctrl.h | 8 +++++++tools/virsh-host.c | 49 ++++++++++++++++++++++++++++++++++++++5 files changed, 133 insertions(+), 1 deletion(-)It perhaps would be good to also report the largest contiguous regionavailable: So that if the space is fragmented, management softwarecan detect the situation beforehand.Like this perhaps:# LD_LIBRARY_PATH=/root/git/libvirt/src/.libs/# /root/git/virshnodegetcachestatsret=0 nparams=10L3.0: free=11520, max_contiguous=X.L3.1: free=11520, max_contiguous=X.
Or:L3.0.free: 11520L3.0.max_contiguous=X.L3.1.free: 11520L3.1.max_contiguous=X.Not sure what is the preferred way to do this in libvirt.Otherwise, testing looks good now.