def xen_mem_use(name):
 global conn
 vm_mem = 0
 for id in conn.listDomainsID():
  dom = conn.lookupByID(id)
  info = dom.info()
  vm_mem = (vm_mem + info[2])
 return vm_mem

def xen_mem_use ( name ) : global conn vm_mem = 0 for id in conn . listDomainsID ( ) : dom = conn . lookupByID ( id ) info = dom . info ( ) vm_mem = ( vm_mem + info [ 2 ] ) return vm_mem
return total memory usage .