Rename vm-top to xentop. Make "xm top" invoke xentop. Make libxenstat a static library, and do not install it.

# HG changeset patch
# User josht@us.ibm.com
# Node ID ea025493dfe39540075ee9e4e75b2146f25bdbd3
# Parent  ce557cc4fdc764ac2ce07b8d4bcae77ecf847c29
Rename vm-top to xentop.  Make "xm top" invoke xentop.  Make libxenstat a static library, and do not install it.
This commit is contained in:
josht@us.ibm.com committed 2005-08-17 16:50:33 +00:00
1 parent 97af2bfb93
commit 3df6bc01b6
8 files changed
+55 -48

No files matched your search

+2 -3
View File
@@ -14,6 +14,7 @@ LD = $(CROSS_COMPILE)ld
CC = $(CROSS_COMPILE)gcc
CPP = $(CROSS_COMPILE)gcc -E
AR = $(CROSS_COMPILE)ar
RANLIB = $(CROSS_COMPILE)ranlib
NM = $(CROSS_COMPILE)nm
STRIP = $(CROSS_COMPILE)strip
OBJCOPY = $(CROSS_COMPILE)objcopy
@@ -37,6 +38,4 @@ CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
KERNEL_REPO = http://www.kernel.org
# Optional components
XENSTAT_PERL_BINDINGS ?= n
XENSTAT_PYTHON_BINDINGS ?= y
XENSTAT_VM_TOP ?= y
XENSTAT_XENTOP ?= y
+7
View File
@@ -49,6 +49,7 @@ xm common subcommands:
restore <File> create a domain from a saved state file
save <DomId> <File> save domain state (and config) to file
shutdown <DomId> shutdown a domain
top monitor system and domains in real-time
unpause <DomId> unpause a paused domain
For a complete list of subcommands run 'xm help --long'
@@ -87,6 +88,7 @@ xm full list of subcommands:
dmesg [--clear] read or clear Xen's message buffer
info get information about the xen host
log print the xend log
top monitor system and domains in real-time
Scheduler Commands:
bvt <options> set BVT scheduler parameters
@@ -452,6 +454,9 @@ def xm_console(args):
os.execvp('/usr/libexec/xen/xenconsole', cmd.split())
console = sxp.child(info, "console")
def xm_top(args):
os.execv('/usr/sbin/xentop', ['/usr/sbin/xentop'])
def xm_dmesg(args):
gopts = Opts(use="""[-c|--clear]
@@ -540,6 +545,8 @@ def xm_block_destroy(args):
commands = {
# console commands
"console": xm_console,
# xenstat commands
"top": xm_top,
# domain commands
"domid": xm_domid,
"domname": xm_domname,
+1 -1
View File
@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
SUBDIRS :=
SUBDIRS += libxenstat
SUBDIRS += vm-top
SUBDIRS += xentop
.PHONY: all install clean
+22 -14
View File
@@ -30,8 +30,9 @@ MAKE_LINK=ln -sf
MAJOR=0
MINOR=0
LIB=src/libxenstat.so.$(MAJOR).$(MINOR)
LINKS=src/libxenstat.so.$(MAJOR) src/libxenstat.so
LIB=src/libxenstat.a
SHLIB=src/libxenstat.so.$(MAJOR).$(MINOR)
SHLIB_LINKS=src/libxenstat.so.$(MAJOR) src/libxenstat.so
OBJECTS=src/xenstat.o src/xen-interface.o
SONAME_FLAGS=-Wl,-soname -Wl,libxenstat.so.$(MAJOR)
@@ -42,9 +43,13 @@ CFLAGS+=-I$(XEN_ROOT)/xen/include/public
CFLAGS+=-I$(LINUX_ROOT)/include/asm-xen/linux-public/
LDFLAGS+=-Lsrc
all: $(LIB) $(LINKS)
all: $(LIB)
$(LIB): $(OBJECTS)
$(AR) rc $@ $^
$(RANLIB) $@
$(SHLIB): $(OBJECTS)
$(CC) $(LDFLAGS) $(SONAME_FLAGS) -shared -o $@ $(OBJECTS)
src/xenstat.o: src/xenstat.c src/xenstat.h src/xen-interface.h
@@ -59,15 +64,17 @@ src/libxenstat.so.$(MAJOR): $(LIB)
src/libxenstat.so: src/libxenstat.so.$(MAJOR)
$(MAKE_LINK) $(<F) $@
install: all
$(INSTALL_DATA) src/xenstat.h $(DESTDIR)$(includedir)/xenstat.h
$(INSTALL_PROG) $(LIB) \
$(DESTDIR)$(libdir)/libxenstat.so.$(MAJOR).$(MINOR)
$(MAKE_LINK) libxenstat.so.$(MAJOR).$(MINOR) \
$(DESTDIR)$(libdir)/libxenstat.so.$(MAJOR)
$(MAKE_LINK) libxenstat.so.$(MAJOR) \
$(DESTDIR)$(libdir)/libxenstat.so
-$(LDCONFIG)
install:
#install: all
# $(INSTALL_DATA) src/xenstat.h $(DESTDIR)$(includedir)/xenstat.h
# $(INSTALL_PROG) $(LIB) $(DESTDIR)$(libdir)/libxenstat.a
# $(INSTALL_PROG) $(SHLIB) \
# $(DESTDIR)$(libdir)/libxenstat.so.$(MAJOR).$(MINOR)
# $(MAKE_LINK) libxenstat.so.$(MAJOR).$(MINOR) \
# $(DESTDIR)$(libdir)/libxenstat.so.$(MAJOR)
# $(MAKE_LINK) libxenstat.so.$(MAJOR) \
# $(DESTDIR)$(libdir)/libxenstat.so
# -$(LDCONFIG)
PYLIB=bindings/swig/python/_xenstat.so
PYMOD=bindings/swig/python/xenstat.py
@@ -84,7 +91,7 @@ all-bindings: perl-bindings python-bindings
# The install-bindings target installs all the language bindings
install-bindings: install-perl-bindings install-python-bindings
$(BINDINGS): $(LIB) $(LINKS) src/xenstat.h
$(BINDINGS): $(SHLIB) $(SHLIB_LINKS) src/xenstat.h
SWIG_FLAGS=-module xenstat -Isrc
@@ -131,4 +138,5 @@ install: install-perl-bindings
endif
clean:
rm -f $(LIB) $(OBJECTS) $(LINKS) $(BINDINGS) $(BINDINGSRC)
rm -f $(LIB) $(SHLIB) $(SHLIB_LINKS) $(OBJECTS) \
$(BINDINGS) $(BINDINGSRC)
@@ -13,8 +13,8 @@
XEN_ROOT=../../..
include $(XEN_ROOT)/tools/Rules.mk
ifneq ($(XENSTAT_VM_TOP),y)
all install vm-top:
ifneq ($(XENSTAT_XENTOP),y)
all install xentop:
else
INSTALL = install
@@ -29,15 +29,15 @@ sbindir=$(prefix)/sbin
CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT)
LDFLAGS += -L$(XEN_LIBXENSTAT) -lxenstat -lcurses
all: vm-top
all: xentop
vm-top: vm-top.o
xentop: xentop.o
install: vm-top vm-top.1
$(INSTALL_PROG) vm-top $(DESTDIR)$(sbindir)/vm-top
$(INSTALL_DATA) vm-top.1 $(DESTDIR)$(man1dir)/vm-top.1
install: xentop xentop.1
$(INSTALL_PROG) xentop $(DESTDIR)$(sbindir)/xentop
$(INSTALL_DATA) xentop.1 $(DESTDIR)$(man1dir)/xentop.1
endif
clean:
rm -f vm-top vm-top.o
rm -f xentop xentop.o
@@ -1,6 +1,3 @@
Inefficient about how it handles newlines in vm-top
for proc/net/dev. Fix.
Display error messages on the help line after bad input at a prompt.
Fractional delay times
Use prompting to search for domains
@@ -13,12 +13,12 @@
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
.TH vm-top 1 "August 2005"
.TH xentop 1 "August 2005"
.SH NAME
\fBvm-top\fR \- displays real-time information about a Xen system and domains
\fBxentop\fR \- displays real-time information about a Xen system and domains
.SH SYNOPSIS
.B vm-top
.B xentop
[\fB\-h\fR]
[\fB\-V\fR]
[\fB\-d\fRSECONDS]
@@ -27,9 +27,9 @@
[\fB\-v\fR]
.SH DESCRIPTION
\fBvm-top\fR displays information about the Xen system and domains, in a
\fBxentop\fR displays information about the Xen system and domains, in a
continually-updating manner. Command-line options and interactive commands
can change the detail and format of the information displayed by \fBvm-top\fR.
can change the detail and format of the information displayed by \fBxentop\fR.
.SH OPTIONS
.TP
@@ -30,13 +30,13 @@
#include <xenstat.h>
#define VM_TOP_VERSION "1.0"
#define XENTOP_VERSION "1.0"
#define VM_TOP_DISCLAIMER \
#define XENTOP_DISCLAIMER \
"Copyright (C) 2005 International Business Machines Corp\n"\
"This is free software; see the source for copying conditions.There is NO\n"\
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
#define VM_TOP_BUGSTO "Report bugs to <dsteklof@us.ibm.com>.\n"
#define XENTOP_BUGSTO "Report bugs to <dsteklof@us.ibm.com>.\n"
#define _GNU_SOURCE
#include <getopt.h>
@@ -178,7 +178,7 @@ static void usage(const char *program)
"-n, --networks output vif network data\n"
"-r, --repeat-header repeat table header before each domain\n"
"-v, --vcpus output vcpu data\n"
"\n" VM_TOP_BUGSTO,
"\n" XENTOP_BUGSTO,
program);
return;
}
@@ -186,9 +186,9 @@ static void usage(const char *program)
/* Print program version information */
static void version(void)
{
printf("vm-top " VM_TOP_VERSION "\n"
printf("xentop " XENTOP_VERSION "\n"
"Written by Judy Fischbach, David Hendricks, Josh Triplett\n"
"\n" VM_TOP_DISCLAIMER);
"\n" XENTOP_DISCLAIMER);
}
/* Clean up any open resources */
@@ -586,7 +586,7 @@ static void print_ssid(xenstat_domain *domain)
}
/* Section printing functions */
/* Prints three line summary header */
/* Prints the top summary, above the domain table */
void do_summary(void)
{
#define TIME_STR_LEN 9
@@ -602,7 +602,7 @@ void do_summary(void)
strftime(time_str, TIME_STR_LEN, TIME_STR_FORMAT,
localtime(&curtime.tv_sec));
num_domains = xenstat_node_num_domains(cur_node);
print("vm-top - %s\n", time_str);
print("xentop - %s\n", time_str);
/* Tabulate what states domains are in for summary */
for (i=0; i < num_domains; i++) {
@@ -630,7 +630,7 @@ void do_summary(void)
xenstat_node_cpu_hz(cur_node)/1000000);
}
/* Display top portion of vm-top */
/* Display the top header for the domain table */
void do_header(void)
{
field_id i;
@@ -651,11 +651,7 @@ void do_header(void)
print("\n");
}
/* Displays bottom portion of vm-top, interactive options
* N toggles network information display, V toggles CPU information
* display, S toggles sort order of information (ascending/descending),
* R toggles whether header is repeated for each domain
*/
/* Displays bottom status line or current prompt */
void do_bottom_line(void)
{
move(lines()-1, 2);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.