fix xm list memory reporting
PATCH RESEND 1/1 fix xm list memory reporting
Due to the recent changes made to the unstable tree, I am resending this patch to comply with its' updates.
This patch addresses bugzilla #649, enabling `xm list' to display the actual amount of memory allocated by a guest. Also this patch:
- makes it more apparent that 'xm mem-set' has no effect on HVM's.
- show's that memory is changing if 'xm list' is issued while guest is
ballooning (w/o touching balloon driver)
Tommie McAfee
Xen-Testing
tools/python/xen/xend/XendDomainInfo.py +4 -0
@@ -1042,6 +1042,10 @@ class XendDomainInfo: except: log.exception('Failed to restart domain %s.', str(self.domid)) + def getSysMem(self): + info = dom_get(self.domid) + xs_memory=int(info['mem_kb'])/1024 + return xs_memory def _preserveForRestart(self): """Preserve a domain that has been shut down, by giving it a new UUID,
tools/python/xen/xend/server/XMLRPCServer.py +1 -1
@@ -79,7 +79,7 @@ methods = ['device_create', 'device_conf 'destroyDevice','getDeviceSxprs', 'setMemoryTarget', 'setName', 'setVCpuCount', 'shutdown', 'send_sysrq', 'getVCPUInfo', 'waitForDevices', - 'getRestartCount'] + 'getRestartCount', 'getSysMem'] exclude = ['domain_create', 'domain_restore']
tools/python/xen/xm/main.py +7 -0
@@ -563,6 +563,12 @@ def parse_sedf_info(info): } def xm_brief_list(doms): + def get_mem_info(): + dom_sysMem=server.xend.domain.getSysMem(d['domid']) + if dom_sysMem: + d['mem']=dom_sysMem + + print '%-40s %3s %5s %5s %10s %9s' % \ ('Name', 'ID', 'Mem', 'VCPUs', 'State', 'Time(s)')
@@ -571,6 +577,7 @@ def xm_brief_list(doms): for dom in doms: d = parse_doms_info(dom) + get_mem_info() print format % d def xm_label_list(doms):
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Ewan Mellor
AppliedQuoted 10 lines · Tommie McAfee
Due to the recent changes made to the unstable tree, I am resending this patch to comply with its' updates.
This patch addresses bugzilla #649, enabling `xm list' to display the actual amount of memory allocated by a guest. Also this patch:
- makes it more apparent that 'xm mem-set' has no effect on HVM's.
- show's that memory is changing if 'xm list' is issued while guest is
ballooning (w/o touching balloon driver)Signed-off-by Tommie McAfee <[email protected]>
Applied, thanks Tommie, and sorry for the delay.
Ewan.