Changeset 533 for trunk/packages
- Timestamp:
- May 15, 2008, 8:58:19 PM (17 years ago)
- Location:
- trunk/packages/sipb-xen-remctl-auto
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-remctl-auto/debian/changelog
r531 r533 1 sipb-xen-remctl-auto (1.0.15) unstable; urgency=low 2 3 * Compute time differences on server to avoid drift 4 5 -- Quentin Smith <quentin@mit.edu> Thu, 15 May 2008 20:58:04 -0400 6 1 7 sipb-xen-remctl-auto (1.0.14) unstable; urgency=low 2 8 -
trunk/packages/sipb-xen-remctl-auto/files/usr/sbin/sipb-xen-listvms
r531 r533 2 2 3 3 import sys 4 import time 4 5 sys.path.insert(0, '/usr/lib/xen-3.1-1/lib/python') 5 6 from xen.lowlevel.xs import xs … … 9 10 def live_vms(): 10 11 domids = set(trans.ls('', '/local/domain')) 11 domids. remove('0')12 domids.discard('0') 12 13 13 14 vms = dict() … … 29 30 data['vm'] = trans.read('', '/local/domain/%d/vm' % domid) 30 31 data['start_time'] = float(trans.read('', '%s/start_time' % data['vm'])) 32 data['uptime'] = time.time()-data['start_time'] 31 33 32 34 return name, data … … 36 38 if '--pickle' in sys.argv[1:]: 37 39 import cPickle 38 cPickle.dump(vms, sys.stdout )40 cPickle.dump(vms, sys.stdout, cPickle.HIGHEST_PROTOCOL) 39 41 else: 40 42 print vms
Note: See TracChangeset
for help on using the changeset viewer.