[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Improve xm uptime command for inactive managed domains
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1184664993 -3600 # Node ID ee7a5ddc184728e2a82078e382eb21e5c54505df # Parent c1deef05c3546fc83d3f4c1cea0f57ff7b6010d4 Improve xm uptime command for inactive managed domains Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx> --- tools/python/xen/xm/main.py | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff -r c1deef05c354 -r ee7a5ddc1847 tools/python/xen/xm/main.py --- a/tools/python/xen/xm/main.py Tue Jul 17 10:33:26 2007 +0100 +++ b/tools/python/xen/xm/main.py Tue Jul 17 10:36:33 2007 +0100 @@ -1729,14 +1729,16 @@ def xm_uptime(args): if k in ['-s', '--short']: short_mode = 1 - doms = getDomains(params, 'running') + doms = getDomains(params, 'all') if short_mode == 0: print '%-33s %4s %s ' % ('Name','ID','Uptime') for dom in doms: d = parse_doms_info(dom) - if int(d['domid']) > 0: + if d['domid'] == '': + uptime = 0 + elif int(d['domid']) > 0: uptime = int(round(d['up_time'])) else: f=open('/proc/uptime', 'r') _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |