ia64/xen-unstable

changeset 11648:ed8f53f81e6e

[XM] Fix 'xm uptime' command.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author kfraser@localhost.localdomain
date Wed Sep 27 14:01:30 2006 +0100 (2006-09-27)
parents 755bc9aa69fb
children d78b31dd07e8
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Wed Sep 27 14:00:33 2006 +0100
     1.2 +++ b/tools/python/xen/xm/main.py	Wed Sep 27 14:01:30 2006 +0100
     1.3 @@ -979,7 +979,7 @@ def xm_uptime(args):
     1.4  
     1.5      for dom in doms:
     1.6          d = parse_doms_info(dom)
     1.7 -        if d['dom'] > 0:
     1.8 +        if d['domid'] > 0:
     1.9              uptime = int(round(d['up_time']))
    1.10          else:
    1.11              f=open('/proc/uptime', 'r')
    1.12 @@ -1006,10 +1006,10 @@ def xm_uptime(args):
    1.13          if short_mode:
    1.14              now = datetime.datetime.now()
    1.15              upstring = now.strftime(" %H:%M:%S") + " up " + upstring
    1.16 -            upstring += ", " + d['name'] + " (" + str(d['dom']) + ")"
    1.17 +            upstring += ", " + d['name'] + " (" + str(d['domid']) + ")"
    1.18          else:
    1.19              upstring += ':%(seconds)02d' % vars()
    1.20 -            upstring = ("%(name)-32s %(dom)3d " % d) + upstring
    1.21 +            upstring = ("%(name)-32s %(domid)3d " % d) + upstring
    1.22  
    1.23          print upstring
    1.24