Commit Graph
89 Commits
Author SHA1 Message Date
Keir Fraser 66664705d9 xentop: Fix xentop for blktap
Blktap devices information isn't shown by xentop currently.

xen-unstable c/s 17813 said "blktap devices have statistics
counters (e.g., rd_req, wr_req, oo_req) prepended by tap_".
In fact, it is as follows.

# ls -l /sys/devices/xen-backend/tap-1-769/statistics/
total 0
-r--r--r-- 1 root root 4096 Dec  3 20:37 oo_req
-r--r--r-- 1 root root 4096 Dec  3 20:37 rd_req
-r--r--r-- 1 root root 4096 Dec  3 20:37 rd_sect
-r--r--r-- 1 root root 4096 Dec  3 20:37 wr_req
-r--r--r-- 1 root root 4096 Dec  3 20:37 wr_sect

The statistics counters haven't had "tap_" because it was removed
by linux-2.6.18-xen c/s 34.

This patch reverts xen-unstable c/s 17813, then we can get the
blktap devices information by using xentop.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-12-03 15:58:23 +00:00
Keir Fraser 13ad235ee7 xentop: Fix display of long domain names.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-09-22 14:04:27 +01:00
Keir Fraser 3adee298e7 Fix a few typos
From: Diego Ongaro <diego.ongaro@eu.citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-08-04 11:25:20 +01:00
Keir Fraser 499da5e253 tools: use $(PREFIX) rather than hard-coding /usr
Signed-off-by: Jan Beulich <jbeulich@novell.com>
2008-07-24 14:33:28 +01:00
Keir Fraser 55bfc14465 xentop: declare signal handler as static
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-07-14 13:26:45 +01:00
Keir Fraser d8be3b59d1 xenstat: some cleanups
sprintf -> snprintf
 malloc(n * m) -> calloc(n, m)
 get rid of a cast

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2008-06-10 14:15:53 +01:00
Keir Fraser 572d6c9581 libxenstat: Fix statistics for blktap disks on linux
Overview: update xenstat vbd statistics parsing from
/sys/devices/xen-backend to process blktap disks

Reason:
        -blktap devices (now referenced as tap rather than vbd in
        /sys) have statistics counters
        (e.g.,  rd_req, wr_req, oo_req) prepended by tap_
        -xenstat behavior did not previously account for this
        behavior, which resulted in 0 disks
        visible and similarly impacted disk statistics

To reproduce these conditions, make a domain with tap:aio backed disks
on 3.2.x, run xentop, and press B to view VBD stats (nothing will
appear for the domain using tap:aio)

Signed-off-by: steve.maresca@gmail.com
2008-06-10 09:27:01 +01:00
Keir Fraser d91702d514 Fix domain names that xentop shows
When I changed the name of a domain by using xm rename command, the
name of the domain that xentop shows did not change.  This patch
reflects new domain name to the name of domains that xentop shows.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2008-05-26 08:37:43 +01:00
Keir Fraser 166a028ffe tools/xenstat build: Use generic subdirs rules.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-03-25 09:49:03 +00:00
Keir Fraser 2376142a75 Add periodic fflush to xentop batch mode.
From: Yusuke KANEKI <Kaneki.Yusuke@ea.MitsubishiElectric.co.jp>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-03-18 11:04:20 +00:00
Keir Fraser b5b593108f tools: Compile xentop only if curses are available.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
2008-03-04 13:29:36 +00:00
Keir Fraser 0d85523cf3 Fix libxenstat on Solaris
Recent Solaris enhancements have changed the way virtual NIC
statistics are collected - fix libxenstat up for this.

Signed-off-by: John Levon <john.levon@sun.com>
2008-02-27 13:10:42 +00:00
Keir Fraser be5fbf9a7f Move generation of public header hierarchy into the tools.
This patch merges the two versions of public header generation
currently used in the build into one.

Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-26 10:38:44 +00:00
Keir Fraser 2b2eda45a3 Add MANDIR, MAN1DIR and MAN8DIR. Use it.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-22 14:35:17 +00:00
Keir Fraser 93e3de7b94 Add SBINDIR. Use it always.
Signed-off-by: Bastian Blank <waldi@debian.org>
2008-01-22 14:35:02 +00:00
Keir Fraser 2eaec0bc67 xentop: build fix for *bsd.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-10-23 14:42:50 +01:00
Keir Fraser 07f557cb63 Replace sysctl.physinfo.sockets_per_node with more directly useful
sysctl.physinfo.nr_cpus. This also avoids miscalculation of
sockets_per_node by Xen where the number of CPUs in the system is
clipped.
From: Elizabeth Kon <eak@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-10-19 18:00:10 +01:00
Keir Fraser 9d6b92ef1a xentop: Flush batch output on SIGTERM or SIGINT.
Signed-off-by: INAKOSHI Hiroya <inakoshi.hiroya@jp.fujitsu.com>
2007-10-02 13:19:25 +01:00
Keir Fraser 98418f1c1e Missed files in previous changeset.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-24 15:41:20 +01:00
Keir Fraser d1729249ef xenstat/xenstore: NetBSD fixes.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
2007-09-24 15:38:52 +01:00
kfraser@localhost.localdomain d1b295913f xentop: fix abnormal value cpu(%) when domain shutdown.
If we test multiple domain create/shutdown many times.
sometimes abnormal values of cpu(%) are appeared.
This is because shutdown domain remove failure.
(in other words, memory corruption of struct )
This corruption makes abnormal cpu(%) values are shown xentop
sometimes.

Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
2007-08-07 09:06:38 +01:00
kfraser@localhost.localdomain be259653f3 Extended the physinfo sysctl to export NUMA cpu_to_node topology info.
Print this in 'xm info'.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-07-06 16:12:07 +01:00
kfraser@localhost.localdomain f63ebd213e xentop: Fix -b option (batch mode).
Some curses libraries don't work with xentop in batch mode, avoid
those calls. Avoid the over-verbose summary lines when batch mode is
requested.

Signed-off-by: Gary Pennington <gary.pennington@sun.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-06-13 11:13:11 +01:00
kfraser@localhost.localdomain c241f9d02d xentop: Display blktap information.
Signed-off-by: Satoshi UCHIDA <s-uchida@ap.jp.nec.com>
2007-06-07 11:14:18 +01:00
kfraser@localhost.localdomain 757d07a4db xenstat: Adding to scan blktap information.
Signed-off-by: Satoshi UCHIDA <s-uchida@ap.jp.nec.com>
2007-06-07 11:13:41 +01:00
kfraser@localhost.localdomain db4208af98 Fix stale email addresses in xenstat and xentop.
Our @us.ibm.com emails cannot forward to us; we do not have access to
them when not interning at IBM.  People have attempted to reach us via
those addresses and failed; occasionally they've Googled for a current
address, which made us realize the problem.  Change each email to a
more permanent address, so people can reach us in the future.  Change
bug reporting addresses to a xen mailing list rather than an
individual.

Signed-off-by: Josh Triplett <josh@kernel.org>
2007-05-31 10:42:34 +01:00
Keir Fraser 19bfd597b4 xenstat: Remove the "vbd-%d-%d is a VBD." debugging statement.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-05-07 13:52:50 +01:00
kfraser@localhost.localdomain eeafc64a2a xentop: Fix memory leak.
Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
2007-04-02 13:08:05 +01:00
kfraser@localhost.localdomain a2d9dd3374 Fix for Solaris compile/output for VBDs in xentop.
Signed-off-by: John Levon <john.levon@sun.com>
2007-02-27 16:13:08 +00:00
kfraser@localhost.localdomain 684c5a8948 Implement VBD and VIF handling on Solaris for libxenstat.
Also, fix up a confusion with ERR that was breaking xentop.

Signed-off-by: John Levon <john.levon@sun.com>
2007-02-23 10:47:55 +00:00
kaf24@localhost.localdomain fa4af86617 Fix xentop error return code if passed unrecognised options.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
2007-01-28 09:33:47 +00:00
kfraser@localhost.localdomain f48232576f Fix trivial bug in xentop main loop.
Signed-off-by: Keir Fraser <keir@xensource.com>
2007-01-12 14:46:21 +00:00
kaf24@localhost.localdomain cc56b92850 [SOLARIS] Fix xentop build.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-29 16:17:53 +00:00
kaf24@firebug.cl.cam.ac.uk c9deb7c4a3 More 'const' cleanups (and fixes, for Solaris).
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-23 09:38:07 +00:00
kfraser@localhost.localdomain f9396bbfe8 Improve consistency of type-attribute usage (volatile/const).
From: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-12-21 13:58:51 +00:00
kfraser@localhost.localdomain 457ee10d4c [XEN] Remove VGCF_hvm_guest, replace with XEN_DOMINF_hvm_guest.
Rename DOMFLAGS_* to XEN_DOMINF_*.
Clean up tools to deal with flags changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-11-03 10:52:29 +00:00
kfraser@localhost.localdomain 980684c3ce [TOOLS][XENTOP] Update usage and manpage to include vbd options.
Also a couple of whitespace fixes.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
2006-10-25 10:25:18 +01:00
kfraser@localhost.localdomain afe801a3be It's not correct to call endwin() if initscr() fails, and it crashes
older libcurses implementations.

Signed-off-by: John Levon <john.levon@sun.com>
2006-10-17 18:36:26 +01:00
kfraser@localhost.localdomain 2d0b60a90f [SOLARIS] A couple of simple compile fixes for tools/ on Solaris.
Signed-off-by: John Levon <john.levon@sun.com>
2006-10-17 18:15:59 +01:00
kfraser@localhost.localdomain d61113c5c7 [SOLARIS] On Solaris, GCC is configured to use Sun's LD. Fix the build to use
the correct flags, and link against libsocket where necessary.

Signed-off-by: John Levon <john.levon@sun.com>
2006-10-17 17:17:57 +01:00
kfraser@localhost.localdomain 6311dc03da Clean up duplication of 'install' macros in the Makefiles.
Signed-off-by: John Levon <john.levon@sun.com>
2006-10-17 15:57:05 +01:00
kfraser@localhost.localdomain 1df421476a Replace dom0_ops hypercall with three new hypercalls:
1. platform_op -- used by dom0 kernel to perform actions on the
    hardware platform (e.g., MTRR access, microcode update, platform
    quirks, ...)
 2. domctl -- used by management tools to control a specified domain
 3. sysctl -- used by management tools for system-wide actions

Benefits include more sensible factoring of actions to
hypercalls. Also allows tool compatibility to be tracked separately
from the dom0 kernel. The assumption is that it will be easier to
replace libxenctrl, libxenguest and Xen as a matched set if the
dom0 kernel does not need to be replaced too (e.g., because that
would require vendor revalidation).

From here on we hope to maintain dom0 kernel compatibility. This
promise is not extended to tool compatibility beyond the existing
guarantee that compatibility will not be broken within a three-level
stable release [3.0.2, 3.0.3, etc.].

Signed-off-by: Keir Fraser <keir@xensource.com>
2006-08-25 18:39:10 +01:00
kaf24@firebug.cl.cam.ac.uk 33351e725f [XENSTAT] Ignore domains that are being created/destroyed during get_info call.
Currently, xenstat_get_node exits with a failure and returns NULL if a
VM is deleted between the time the list of VMs is obtained and the time
it attempts to collect information about the VMs. This patch modifies xenstat
to ignore domains that transition during the call.

Signed-off-by: Simon Graham <Simon.Graham@stratus.com>
2006-08-08 10:36:32 +01:00
kfraser@localhost.localdomain 49b537fc59 Remove unnecessary include of linux/compiler.h in libxenstat.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
2006-07-26 13:36:13 +01:00
kfraser@localhost.localdomain 412dc9c9ff [XENTOP] Fix Field attributes and width.
It miss that set the FIELD attribute and width for VBD
information in xentop.c.

Signed-off-by  Satoshi UCHIDA <s-uchida@ap.jp.nec.com>
2006-07-05 11:24:09 +01:00
chris@kneesaa.uk.xensource.com 5c561080e2 Remove use of unlikely -- it's not defined on all systems.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
2006-06-30 14:15:12 +01:00
kaf24@firebug.cl.cam.ac.uk 00626c0522 [XENTOP]Add VBD information.
Display VBD information at xentop.
By put 'x' key, display each VBD information in detail.

Signed-off-by: Satoshi UCHIDA <s-uchida@ap.jp.nec.com>
2006-06-30 09:25:42 +01:00
kaf24@firebug.cl.cam.ac.uk 4d1d8594df [XENSTAT]Add VBD information structure.
Import VBD information from sysfs.

Signed-off-by: Satoshi UCHIDA <s-uchida@ap.jp.nec.com>
2006-06-30 09:20:22 +01:00
kaf24@firebug.cl.cam.ac.uk 73e44d2f08 [XENTOP] Fix CPU percentage display in batch mode.
From: shaocyou <shaocyou@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-28 10:24:05 +01:00
kaf24@firebug.cl.cam.ac.uk d3ecb7e352 [XENTOP] Adds batch mode processing option (output to stdout)
to the xentop utility. It also adds the ability to specify the
number of iterations xentop should produce before exiting.

a) xentop -b

will output to stdout.

b) xentop -i <number>

will iterate <number> times and exit (option "n" is already used by
xentop. Hence the choice of "i"). This option can be used for both the
curses and batch modes.

From: Hariprasad Nellitheertha <mlisthari@gmail.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
2006-06-28 10:22:13 +01:00