WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Improve xm uptime command for inactive ma

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Improve xm uptime command for inactive managed domains
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 27 Jul 2007 03:07:49 -0700
Delivery-date: Fri, 27 Jul 2007 03:05:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Improve xm uptime command for inactive managed domains, Xen patchbot-unstable <=