Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
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);
+}
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);
"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);