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] Fix reporting of time intervals in the log mode of XenMo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix reporting of time intervals in the log mode of XenMon.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 07 Mar 2006 00:48:07 +0000
Delivery-date: Tue, 07 Mar 2006 00:48:44 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 0ad422291688b5b3d497a0cedfb2be045589c721
# Parent  d60392d5b8187c98b90a56485dcc8857d834b56c
Fix reporting of time intervals in the log mode of XenMon.
Fix duration to sleep between iterations (earlier hardcoded to 1sec)
Signed-off-by: Diwaker Gupta <dgupta@xxxxxxxxxxx>

diff -r d60392d5b818 -r 0ad422291688 tools/xenmon/xenmon.py
--- a/tools/xenmon/xenmon.py    Mon Mar  6 19:29:39 2006
+++ b/tools/xenmon/xenmon.py    Mon Mar  6 22:47:14 2006
@@ -502,6 +502,7 @@
     shm = mmap.mmap(shmf.fileno(), QOS_DATA_SIZE)
 
     interval = 0
+    curr = last = time.time()
     outfiles = {}
     for dom in range(0, NDOMAINS):
         outfiles[dom] = Delayed("%s-dom%d.log" % (options.prefix, dom), 'w')
@@ -561,9 +562,10 @@
                                      h1[dom][4], 
                                      h1[dom][5][0], h1[dom][5][1]))
                     outfiles[dom].flush()
-
-        interval += options.interval
-        time.sleep(1)
+            curr = time.time()
+            interval += (curr - last) * 1000
+            last = curr
+        time.sleep(options.interval / 1000.0)
 
     for dom in range(0, NDOMAINS):
         outfiles[dom].close()

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix reporting of time intervals in the log mode of XenMon., Xen patchbot -unstable <=