Commit Graph
105 Commits
Author SHA1 Message Date
Michael Young bdce365321 tools: Fix memset(&p,0,sizeof(p)) idiom in several places.
gcc 4.8 identifies several places where code of the form memset(x, 0,
sizeof(x)); is used incorrectly, meaning that less memory is set to
zero than required.

Signed-off-by: Michael Young <m.a.young@durham.ac.uk>
Committed-by: Keir Fraser <keir@xen.org>
(cherry picked from commit d119301b58)
2013-02-28 11:48:29 +00:00
Keir Fraser 7297daddfa build: Make XEN_ROOT an absolute path.
Otherwise make can search the path relative to certain standard paths
such as /usr/include (e.g., the line '-include $(XEN_ROOT)/.config' in
Config.mk suffers from this).

Signed-off-by: Keir Fraser <keir@xen.org>

xen-unstable changeset: 23049:ff3b7749008b
Backport-requested-by: Allen M Kay <allen.m.kay@intel.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2011-10-06 19:47:14 +01:00
Stefano Stabellini ba26a1e197 split LDLIBS from LDFLAGS to fix link errors in recent toolchains
Linker command lines are order-sensitive.
Move linker options -Lfoo -lfoo from LDFLAGS to LDLIBS and place this new
variable after the objects to link. This resolves build errors in xenpagin
and blktap with recent toolchains.

rename SHLIB_CFLAGS to SHLIB_LDFLAGS
rename LDFLAGS_* to LDLIBS_*
move LDFLAGS usage after CFLAGS in CC calls
remove stale comments in xenpaging Makefile

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-08-11 18:02:32 +01:00
Keir Fraser 5cc436c1d2 libxc: eliminate static variables, use xentoollog; API change
This patch eliminate the global variables in libxenctrl (used for
logging and error reporting).

Instead the information which was in the global variables is now in a
new xc_interface* opaque structure, which xc_interface open returns
instead of the raw file descriptor; furthermore, logging is done via
xentoollog.

There are three new parameters to xc_interface_open to control the
logging, but existing callers can just pass "0" for all three to get
the old behaviour.

All libxc callers have been adjusted accordingly.

Also update QEMU_TAG for corresponding qemu change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-05-28 09:30:19 +01:00
Keir Fraser 070cf3db9e xentop: fix NULL pointer dereference
On my system, I'm getting SIGSEGVs in xentop because
xenstat_node_domain() is returning NULL.  Skip the loop if it does
rather than crashing.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2010-05-20 14:10:07 +01:00
Keir Fraser eccb4696e8 Fix Makefile targets that generate several files at once
In a few places in the tree the Makefiles have constructs like this:
   one_file another_file:
       $(COMMAND_WHICH_GENERATES_BOTH_AT_ONCE)
This is wrong, because make will run _two copies_ of the same command
at once.  This generally causes races and hard-to-reproduce build
failures.

Notably, `make -j4' at the top level will build stubdom libxc twice
simultaneously!

In this patch we replace the occurrences of this construct with the
correct idiom:
   one_file: another_file
   another_file:
       $(COMMAND_WHICH_GENERATES_BOTH_AT_ONCE)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2010-03-05 14:40:19 +00:00
Keir Fraser 41a3140ea2 xentop: tmem: no stats for non-tmem domains
In xentop, don't re-use and print stale data of previous tmem
domain for subsequent non-tmem domain.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
2010-03-03 17:40:48 +00:00
Keir Fraser 5f05fba8c1 tmem, xentop: Report a few key per-domain tmem statistics in xentop.
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
2009-12-09 10:46:11 +00:00
Keir Fraser 422f39c72e xentop: Allow full domain name display
Add a '-f' option to xentop to allow the full domain name to be
displayed. This is the original behavior which can cause the display
to be unaligned. Customers have requested this because only the
trailing characters of their domain names are unique and therefore
cannot be distinguished when the display is limited to a 10 character
width.

Signed-off-by: Charles Arnold <carnold@novell.com>
2009-12-02 18:43:28 +00:00
Keir Fraser 80d4e9ca77 xenstat: Fixes for 20528:e6e3bf767d16 (stats for dom0 network bonding)
In above c/s I introduced dom0 statistics for case we use network
bonding. The indentation was not good for xenstat C codebase and also
some modifications were done to the logic, mainly not using the parsed
variables we don't care about (as we care only about
{tx|rx}{bytes,packets,errs,drops} and no other variable from
/proc/net/dev) by passing NULLs to variables we don't care about. Also
dom0 statistics alteration was fixed to include {tx|rx}{drop,errs} for
dom0 (previous version of my patch was not having this code applied).

Signed-off-by: Michal Novotny <minovotn@redhat.com>
2009-12-02 13:45:35 +00:00
Keir Fraser fc50aaf0d8 xentop: Add tmem-freeable info when tmem is active
(No change to xentop output when tmem is inactive.)

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
2009-12-01 13:38:18 +00:00
Keir Fraser 1fd93d4f8c xenstat: Linux dom0 statistics for case we use network bonding
I've created a patch that alters dom0 statistics (if empty like in
case of network bonding) and puts network bridge statistics
instead. It's been tested with network bonding both enabled and
disabled and also by creating a standalone network bridge without
bonding... It was working fine in all my tests...

Signed-off-by: Michal Novotny <minovotn@redhat.com>
2009-12-01 13:37:20 +00:00
Keir Fraser 14ec087884 xentop: Add two more VBD statistics
In addition to VBD read/write request#, add VBD read/write sector#
also. It makes VBD throughput observation easier. As the method to get
such info is OS dependent, just Linux version code is added.

Signed-off-by: Yang Xiaowei <xiaowei.yang@intel.com>
2009-11-05 12:00:58 +00:00
Keir Fraser aa4af83c50 xenstat: Use backend path which is compatible with pvops and 2.6.18-xen kernels.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2009-07-07 14:01:30 +01:00
Keir Fraser 9f8501582f Use -MMD -MF in tools/* rather than -Wp,-M...
If you use -MMD -MF then the correct .o filename is written to the
.*.d file as the compiler driver arranges everything.  This was done
in 19010:275abe1c5d24 for the hypervisor.

In this patch we do the same elsewhere in the xen-unstable tree,
particularly tools/.  Specifically:
 * Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS.
 * Remove -Wp,-MD... from every other Makefile
 * Remove setting of DEPS from every other Makefile
 * Ensure that every Makefile says -include $(DEPS)
 * Ensure that every Makefile's clean target removes $(DEPS)

Some Makefiles were already halfway there, but often for a different
variable name eg PROG_DEP.  The variable name is now standardised in
Rules.mk as DEPS.

I have done a test build with this change, on Debian etch.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2009-01-12 10:16:05 +00:00
Keir Fraser 050404c847 xentop: Fix fprintf() build failure.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
2008-12-11 22:32:20 +00:00
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