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 <tommie.mcafee@unisys.com>
This commit is contained in:
Ewan Mellor committed 2006-11-08 09:50:09 +00:00
1 parent 41002e30c7
commit ac31115528
3 files changed
+12 -1

No files matched your search

+4
View File
@@ -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,
+1 -1
View File
@@ -79,7 +79,7 @@ methods = ['device_create', 'device_configure',
'destroyDevice','getDeviceSxprs',
'setMemoryTarget', 'setName', 'setVCpuCount', 'shutdown',
'send_sysrq', 'getVCPUInfo', 'waitForDevices',
'getRestartCount']
'getRestartCount', 'getSysMem']
exclude = ['domain_create', 'domain_restore']
+7
View File
@@ -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):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.