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] xl: Add "xl top" command, a clone of "xm

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xl: Add "xl top" command, a clone of "xm top".
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 May 2010 00:40:31 -0700
Delivery-date: Fri, 14 May 2010 00:42:11 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1273650750 -3600
# Node ID 4bf0ea1482238adbf943fe8e9cfb9b05ba0337ef
# Parent  85df4f6f7023d4921bcd55e982883e1b3dfba4e5
xl: Add "xl top" command, a clone of "xm top".

Signed-off-by: Yang Hongyang <yanghy@xxxxxxxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c  |   20 ++++++++++++++++++++
 tools/libxl/xl_cmdimpl.h  |    1 +
 tools/libxl/xl_cmdtable.c |    5 +++++
 3 files changed, 26 insertions(+)

diff -r 85df4f6f7023 -r 4bf0ea148223 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Wed May 12 08:52:07 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Wed May 12 08:52:30 2010 +0100
@@ -3098,3 +3098,23 @@ int main_sysrq(int argc, char **argv)
 
     exit(0);
 }
+
+int main_top(int argc, char **argv)
+{
+    int opt;
+
+    while ((opt = getopt(argc, argv, "h")) != -1) {
+        switch (opt) {
+        case 'h':
+            help("top");
+            exit(0);
+        default:
+            fprintf(stderr, "option `%c' not supported.\n", opt);
+            break;
+        }
+    }
+
+    system("xentop");
+
+    exit(0);
+}
diff -r 85df4f6f7023 -r 4bf0ea148223 tools/libxl/xl_cmdimpl.h
--- a/tools/libxl/xl_cmdimpl.h  Wed May 12 08:52:07 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.h  Wed May 12 08:52:30 2010 +0100
@@ -40,5 +40,6 @@ int main_rename(int argc, char **argv);
 int main_rename(int argc, char **argv);
 int main_trigger(int argc, char **argv);
 int main_sysrq(int argc, char **argv);
+int main_top(int argc, char **argv);
 
 void help(char *command);
diff -r 85df4f6f7023 -r 4bf0ea148223 tools/libxl/xl_cmdtable.c
--- a/tools/libxl/xl_cmdtable.c Wed May 12 08:52:07 2010 +0100
+++ b/tools/libxl/xl_cmdtable.c Wed May 12 08:52:30 2010 +0100
@@ -177,6 +177,11 @@ struct cmd_spec cmd_table[] = {
       "Send a sysrq to a domain",
       "<Domain> <letter>",
     },
+    { "top",
+      &main_top,
+      "Monitor a host and the domains in real time",
+      "",
+    },
 };
 
 int cmdtable_len = sizeof(cmd_table)/sizeof(struct cmd_spec);

_______________________________________________
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] xl: Add "xl top" command, a clone of "xm top"., Xen patchbot-unstable <=