4 sys.path.insert(0, '/usr/lib/xen-3.1-1/lib/python')
5 from xen.lowlevel.xs import xs
10 domids = set(trans.ls('', '/local/domain'))
16 name, data = get_dom(int(domid))
17 if name.startswith('d_'):
23 name = trans.read('', '/local/domain/%d/name' % domid)
26 # presence of a graphical console
27 data['console'] = trans.read('', '/local/domain/%d/device/vfb/0/state' % domid)
29 data['vm'] = trans.read('', '/local/domain/%d/vm' % domid)
30 data['start_time'] = float(trans.read('', '%s/start_time' % data['vm']))
34 if __name__ == '__main__':
36 if '--pickle' in sys.argv[1:]:
38 cPickle.dump(vms, sys.stdout)