Changeset 716 for trunk/packages
- Timestamp:
- Jul 23, 2008, 1:08:38 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-remctl-auto/files/usr/sbin/sipb-xen-listvms
r715 r716 4 4 import time 5 5 sys.path.insert(0, '/usr/lib/xen-3.1-1/lib/python') 6 from xen.lowlevel .xsimport xs6 from xen.lowlevel import xs 7 7 8 trans =xs()8 xsc = xs.xs() 9 9 10 10 def live_vms(): 11 domids = set( trans.ls('', '/local/domain'))11 domids = set(xsc.ls('', '/local/domain')) 12 12 domids.discard('0') 13 13 … … 25 25 26 26 def get_dom(domid): 27 name = trans.read('', '/local/domain/%d/name' % domid)27 name = xsc.read('', '/local/domain/%d/name' % domid) 28 28 data = dict() 29 29 data['domid'] = domid 30 30 # presence of a graphical console 31 data['console'] = trans.read('', '/local/domain/%d/device/vfb/0/state' % domid)31 data['console'] = xsc.read('', '/local/domain/%d/device/vfb/0/state' % domid) 32 32 # uptime 33 data['vm'] = trans.read('', '/local/domain/%d/vm' % domid)34 data['start_time'] = float( trans.read('', '%s/start_time' % data['vm']))33 data['vm'] = xsc.read('', '/local/domain/%d/vm' % domid) 34 data['start_time'] = float(xsc.read('', '%s/start_time' % data['vm'])) 35 35 data['uptime'] = time.time()-data['start_time'] 36 36
Note: See TracChangeset
for help on using the changeset viewer.