Changeset 715


Ignore:
Timestamp:
Jul 23, 2008, 1:05:17 AM (10 years ago)
Author:
price
Message:

revert r714 for speed

The xen.lowlevel interface is 66ms on xs-blade-2 right now,
and the xen.xend.xenstore interface is about 120ms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-remctl-auto/files/usr/sbin/sipb-xen-listvms

    r714 r715  
    44import time
    55sys.path.insert(0, '/usr/lib/xen-3.1-1/lib/python')
    6 from xen.xend.xenstore import xstransact
     6from xen.lowlevel.xs import xs
    77
    8 xst = xstransact.xstransact()
     8trans = xs()
    99
    1010def live_vms():
    11     domids = set(xst.List('/local/domain'))
     11    domids = set(trans.ls('', '/local/domain'))
    1212    domids.discard('0')
    1313
     
    2525
    2626def get_dom(domid):
    27     name = xst.Read('/local/domain/%d/name' % domid)
     27    name = trans.read('', '/local/domain/%d/name' % domid)
    2828    data = dict()
    2929    data['domid'] = domid
    3030    # presence of a graphical console
    31     data['console'] = xst.Read('/local/domain/%d/device/vfb/0/state' % domid)
     31    data['console'] = trans.read('', '/local/domain/%d/device/vfb/0/state' % domid)
    3232    # uptime
    33     data['vm'] = xst.Read('/local/domain/%d/vm' % domid)
    34     data['start_time'] = float(xst.Read('%s/start_time' % data['vm']))
     33    data['vm'] = trans.read('', '/local/domain/%d/vm' % domid)
     34    data['start_time'] = float(trans.read('', '%s/start_time' % data['vm']))
    3535    data['uptime'] = time.time()-data['start_time']
    3636   
Note: See TracChangeset for help on using the changeset viewer.