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-devel

[Xen-devel] [patch] xenmon.py: add next/previous bindings to curses mode

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch] xenmon.py: add next/previous bindings to curses mode
From: "Diwaker Gupta" <diwaker.lists@xxxxxxxxx>
Date: Mon, 6 Mar 2006 13:20:15 -0800
Delivery-date: Mon, 06 Mar 2006 21:20:56 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Ak7sgYiaR0TkbUmfQLurlI2p7ZpwcFX4ugfNZtwJrY6WFl23VZ0nlm3b0J+t25lZEWDRG0ACZvaLq1xzuMIF8YihL3jwJKVc1ZZp2+ny4OPgUFUlVMUescJAdW8x91HTizOGJ6gjqdLiWYlxXP5GH9rYKKqo8BQpMMk2PW9baC4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Cycling around many CPUs in XenMon's curses mode can get cumbersome.
This trivial patch adds bindings to move to the previous CPU. The
next/previous binding seems more natural to me than the earlier cycle
binding, but we can keep them all for now.

# HG changeset patch
# Node ID 146b5c76086c07fad61bea7ccf60f2f4fd66abbd
# Parent  7dd31dbf16e75f0f70e0f9c44b2bb2b5fc6eecf1
Add next/previous key bindings to XenMon curses mode.

Signed-off-by: Diwaker Gupta <dgupta@xxxxxxxxxxx>

diff -r 7dd31dbf16e7 -r 146b5c76086c tools/xenmon/xenmon.py
--- a/tools/xenmon/xenmon.py    Mon Mar  6 13:02:50 2006 -0800
+++ b/tools/xenmon/xenmon.py    Mon Mar  6 13:17:38 2006 -0800
@@ -452,6 +452,12 @@ def show_livestats():
         if c == ord('c'):
             cpu = (cpu + 1) % ncpu

+        # n/p = cycle to the next/previous CPU
+        if c == ord('n'):
+            cpu = (cpu + 1) % ncpu
+        if c == ord('p'):
+            cpu = (cpu - 1) % ncpu
+
         stdscr.erase()

     _c.nocbreak()

--
Web/Blog/Gallery: http://floatingsun.net/blog

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [patch] xenmon.py: add next/previous bindings to curses mode, Diwaker Gupta <=