Improve xm uptime command for inactive managed domains

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This commit is contained in:
kfraser@localhost.localdomain committed 2007-07-17 10:36:33 +01:00
1 parent f0a8a3f3fb
commit b60125e83e
1 file changed
+4 -2
+4 -2
View File
@@ -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')
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.