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/
Home Products Support Community News


[Xen-changelog] [xen-unstable] [XENMON] Add argument check of "--ms_per_

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XENMON] Add argument check of "--ms_per_sample" option.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 19 Sep 2006 12:40:14 +0000
Delivery-date: Tue, 19 Sep 2006 05:41:11 -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
# Node ID e5d29225a8d12aa3855339cbbef81dbb75dcaa78
# Parent  33955ca54ec1b04d304c809f2b59ca72a9d580cd
[XENMON] Add argument check of "--ms_per_sample" option.

If a value of "--ms_per_sample" option is larger than a value of
"--time" option, xenmon may generate no log file. So, too large
"--ms_per_sample" should be treated as an error.

  % xenmon.py --ms_per_sample=2000 -t 1 -n
  usage: xenmon.py [options]

  xenmon.py: error: option --ms_per_sample: too large (> 1000 ms)

# Notice that a unit of "--time" is a second.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
 tools/xenmon/xenmon.py |    5 +++++
 1 files changed, 5 insertions(+)

diff -r 33955ca54ec1 -r e5d29225a8d1 tools/xenmon/xenmon.py
--- a/tools/xenmon/xenmon.py    Tue Sep 19 11:03:36 2006 +0100
+++ b/tools/xenmon/xenmon.py    Tue Sep 19 11:08:11 2006 +0100
@@ -675,6 +675,11 @@ def main():
     if options.mspersample < 0:
         parser.error("option --ms_per_sample: invalid negative value: '%d'" %
+    # If --ms_per_sample= is too large, no data may be logged.
+    if not options.live and options.duration != 0 and \
+       options.mspersample > options.duration * 1000:
+        parser.error("option --ms_per_sample: too large (> %d ms)" %
+                     (options.duration * 1000))
     if options.live:

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XENMON] Add argument check of "--ms_per_sample" option., Xen patchbot-unstable <=