svn path=/trunk/packages/sipb-xen-remctl-auto/; revision=533
+sipb-xen-remctl-auto (1.0.15) unstable; urgency=low
+
+ * Compute time differences on server to avoid drift
+
+ -- Quentin Smith <quentin@mit.edu> Thu, 15 May 2008 20:58:04 -0400
+
sipb-xen-remctl-auto (1.0.14) unstable; urgency=low
* Use more efficient python API to get VM information, and return it
sipb-xen-remctl-auto (1.0.14) unstable; urgency=low
* Use more efficient python API to get VM information, and return it
#!/usr/bin/python
import sys
#!/usr/bin/python
import sys
sys.path.insert(0, '/usr/lib/xen-3.1-1/lib/python')
from xen.lowlevel.xs import xs
sys.path.insert(0, '/usr/lib/xen-3.1-1/lib/python')
from xen.lowlevel.xs import xs
def live_vms():
domids = set(trans.ls('', '/local/domain'))
def live_vms():
domids = set(trans.ls('', '/local/domain'))
# uptime
data['vm'] = trans.read('', '/local/domain/%d/vm' % domid)
data['start_time'] = float(trans.read('', '%s/start_time' % data['vm']))
# uptime
data['vm'] = trans.read('', '/local/domain/%d/vm' % domid)
data['start_time'] = float(trans.read('', '%s/start_time' % data['vm']))
+ data['uptime'] = time.time()-data['start_time']
vms = live_vms()
if '--pickle' in sys.argv[1:]:
import cPickle
vms = live_vms()
if '--pickle' in sys.argv[1:]:
import cPickle
- cPickle.dump(vms, sys.stdout)
+ cPickle.dump(vms, sys.stdout, cPickle.HIGHEST_PROTOCOL)