aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenmon
Commit message (Collapse)AuthorAgeFilesLines
* tools/xenmon: Fix typo in MakefileDaniel Kiper2013-05-081-1/+1
| | | | | Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/build: Introduce {PREPEND,APPEND}_{LIB,INCLUDES}Roger Pau Monne2011-11-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Create two new variables called APPEND_ and PREPEND_ to add compile flags at the beginning or at the end of the search path. Added a new semantic for user defined compile flags, here is the list of possible options: PREPEND_LIB: add libraries to the search path before xen (before xen installation folders). PREPEND_INCLUDES: add headers to the search path before xen (before xen installation folders). APPEND_LIB: add libraries to the search path at the end (after all xen installation folders have been added). APPEND_INCLUDES: add libraries to the search path at the end (after all xen installation folders have been added). EXTRA_INCLUDES and EXTRA_LIB can still be used, and they will have the same effect as PREPEND_INCLUDES and PREPEND_LIB. Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: remove some .o and binary files on cleanIan Campbell2011-03-311-1/+3
| | | | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: remove pattern matched linking rulesIan Campbell2011-03-311-6/+4
| | | | | | | | | Most subdirs only build a single tool to start with and those which build multiple tools often have different linkage requirements. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Remove $(CFLAGS) from links lines.Ian Campbell2011-03-311-4/+5
| | | | | | | | The relevant variable in these circumstances is called $(LDFLAGS). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Drop XEN_XC variableIan Campbell2011-03-211-1/+0
| | | | | | | | | There is nothing to include in the python bindings source directory and likely never was/will be ... Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* build: Make XEN_ROOT an absolute path.Keir Fraser2011-03-171-1/+1
| | | | | | | | 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>
* libxc: convert evtchn interfaces to use an opaque handle typeIan Campbell2010-12-231-5/+5
| | | | | | | | | | | | This makes the interface consistent with the changes made to the main interface in 21483:779c0ef9682c. Also fix some references to "struct xc_interface" which should have been simply "xc_interface" in tools/xenpaging, and update QEMU_TAG to pull in the corresponding qemu change. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* split LDLIBS from LDFLAGS to fix link errors in recent toolchainsStefano Stabellini2010-08-111-3/+3
| | | | | | | | | | | | | | | | 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>
* trace: share t_info pages only in read-only modeKeir Fraser2010-06-291-5/+5
| | | | | | | | There's no need to share writably the t_info pages (Dom0 only wants [and needs] to read it) Signed-off-by: Jan Beulich <jbeulich@novell.com> Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
* libxc: eliminate static variables, use xentoollog; API changeKeir Fraser2010-05-282-10/+11
| | | | | | | | | | | | | | | | | | | | 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>
* tools/xenbaked: fix bug of Segmentation faultKeir Fraser2010-02-101-70/+52
| | | | | | | | Run xenbaked will cause Segmentation fault, because the method to get pointers of trace buffer metadata is wrong. Fix this bug according to xentrace. Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
* Use -MMD -MF in tools/* rather than -Wp,-M...Keir Fraser2009-01-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | 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>
* tools/xenmon/Makefile: Move LDFLAGS after $<Keir Fraser2008-08-271-2/+2
| | | | | | | | | | | gcc expects libraries needed for object files to be specified after the object. Linking usually does not fail, unless it is optimized (for instance, using -Wl,-as-needed). The related Gentoo bug is 135145 [ https://bugs.gentoo.org/135145 ]. From: Robert Buchholz <rbu@gentoo.org> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* install more documentation to /usr/share/doc/xen and /etc/xenKeir Fraser2008-08-061-0/+2
| | | | | | Also resync xmexample3 with xmexample1 and 2. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* tools: Declare functions static where they should be, and provideKeir Fraser2008-07-151-42/+45
| | | | | | proper prototypes for others as required. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* tools: replace sprintf with snprintf where applicableKeir Fraser2008-06-121-2/+6
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xenbaked: Fix access to trace buffer after xentrace changesKeir Fraser2008-04-241-5/+27
| | | | Signed-off-by: Naoki Nishiguchi <nisiguti@jp.fujitsu.com>
* libxenctrl headers should not pollute macro namespace withKeir Fraser2008-02-121-2/+2
| | | | | | | mb/rmb/wmb. Instead add a xen_ prefix. Modify Xen's public headers to expect the prefixed names instead of bare mb/rmb/wmb, but gate this expectation on a bump of __XEN_INTERFACE_VERSION__. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Define CFLAGS and LDFLAGS for libxenctrl.Keir Fraser2008-01-271-5/+4
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Move generation of public header hierarchy into the tools.Keir Fraser2008-01-261-0/+1
| | | | | | | 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>
* Add SBINDIR. Use it always.Keir Fraser2008-01-221-6/+4
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Fix xenmon.py to work on SolarisKeir Fraser2007-12-041-5/+20
| | | | | | | | | The xenmon.py script does not work on Solaris because of (1) its assumption that xenbaked is in the users path and, (2) the use of the killall command. Changed xenmon.py to use pkill instead and provided the path to xenbaked on Solaris. Signed-off-by: Tariq Magdon-Ismail <tariqmi@sun.com>
* xentrace: make xentrace and xenmon work on Solaris and *BSD.Keir Fraser2007-11-161-86/+91
| | | | | | | | | | | | - Use getopt() to get rid of argp dependency which does not exist on Solaris and *BSD. Done by Tariq Magdon-Ismail. - Minor modifications by me (Christoph) to make it also work on *BSD. - Tested on Linux by me (Christoph). No functional change on Linux. - Tariq ok'd BSD modifications for Solaris - Tariq ok'd submission by me :) Signed-off-by: Tariq Magdon-Ismail <tariqmi@sun.com> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xenmon: Fix security vulnerability CVE-2007-3919.Keir Fraser2007-10-232-2/+2
| | | | | | | | | | | | | | | The xenbaked daemon and xenmon utility communicate via a mmap'ed shared file. Since this file is located in /tmp, unprivileged users can cause arbitrary files to be truncated by creating a symlink from the well-known /tmp filename to e.g., /etc/passwd. The fix is to place the shared file in a directory to which only root should have access (in this case /var/run/). This bug was reported, and the fix suggested, by Steve Kemp <skx@debian.org>. Thanks! Signed-off-by: Keir Fraser <keir@xensource.com>
* Replace sysctl.physinfo.sockets_per_node with more directly usefulKeir Fraser2007-10-191-4/+1
| | | | | | | | 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>
* Remove tabs from python scripts xenmon and xentrace_format.Keir Fraser2007-10-081-7/+7
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* xenbaked: Fix for new trace format.Keir Fraser2007-10-041-3/+3
| | | | Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
* Xen tracing cleanups and fixes.Keir Fraser2007-09-241-299/+304
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Extended the physinfo sysctl to export NUMA cpu_to_node topology info.kfraser@localhost.localdomain2007-07-061-1/+1
| | | | | | Print this in 'xm info'. Signed-off-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* Replace tabs with spaces.Ewan Mellor2007-03-231-11/+11
| | | | Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* I found a small bug in xenmon. Even if I gave xenmon a wrongEwan Mellor2006-11-021-1/+3
| | | | | | | | | | | | | | | parameter, xenmon did not become an error. This patch adds a checking of wrong parameter into xenmon. If wrong parameter is given, xenmon shows the following error messages. usage: xenmon.py [options] xenmon.py: error: No parameter required Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
* Stop enforcing -g for some of the tools.kfraser@localhost.localdomain2006-10-311-1/+1
| | | | Signed-off-by: John Levon <john.levon@sun.com>
* Clean up duplication of 'install' macros in the Makefiles.kfraser@localhost.localdomain2006-10-171-7/+2
| | | | Signed-off-by: John Levon <john.levon@sun.com>
* [XENMON] Add argument check of "--ms_per_sample" option.kfraser@localhost.localdomain2006-09-191-0/+5
| | | | | | | | | | | | | | | | If a value of "--ms_per_sample" option is larger than a value of "--time" option, xenmon may generate no log file. So, too large "--ms_per_sample" should be treated as an error. e.g. % xenmon.py --ms_per_sample=2000 -t 1 -n usage: xenmon.py [options] xenmon.py: error: option --ms_per_sample: too large (> 1000 ms) # Notice that a unit of "--time" is a second. Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* This patch adds the argument check of "--ms_per_sample=" option. ForEwan Mellor2006-09-051-0/+3
| | | | | | | | | | | | | | "--ms_per_sample=", a negative value should be invalid. e.g. % xenmon.py -n --ms_per_sample=-1 usage: xenmon.py [options] xenmon.py: error: option --ms_per_sample: invalid negative value: '-1' Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* Replace dom0_ops hypercall with three new hypercalls:kfraser@localhost.localdomain2006-08-251-18/+17
| | | | | | | | | | | | | | | | | | | | | | 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>
* Rename two xentrace tools to make it obvious that setmask and setsize are ↵kfraser@localhost.localdomain2006-08-161-5/+5
| | | | | | | | | xen related. Based on a patch from Rob Gardner <rob.gardner@hp.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* Remove another external-to-libxc user of xc_dom0_op().kfraser@localhost.localdomain2006-08-151-10/+7
| | | | | Signed-off-by: John Levon <john.levon@sun.com>
* Fix domid range check in xenmon.kfraser@localhost.localdomain2006-07-251-5/+3
| | | | | | Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* Domain ID/index mapping in xenmon.kfraser@localhost.localdomain2006-07-102-122/+197
| | | | | | | | | | | | | | | This patch addresses the problem of xenbaked/xenmon not dealing with large domain ID's. Xen Domain ID's increase monotonically as domains are created; The ID's are not (often) recycled. Xenbaked was using the domain ID's as indices to arrays of data, and this scheme blows up as soon as a domain ID exceeds the array size. Code has been changed in xenbaked and xenmon to isolate domain id's from array indices, so everything is indirect. Users should not notice any difference in behavior. From: Rob Gardner <rob.gardner@hp.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* [XENMON] This patch removes the magic number "31" for readability.kfraser@localhost.localdomain2006-07-051-7/+19
| | | | | | | | | | | The number "31" means the idle domain ID. In detail: - display the idle domain ID with "Idle" instead of "31" - write to the file "log-idle.log" instead of "log-dom31.log". Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
* [TOOLS] Introduce xc_evtchn_*() interface for interacting with /dev/xen/evtchn.kaf24@firebug.cl.cam.ac.uk2006-06-151-39/+16
| | | | | | | | No longer open the device as non-blocking: all reads immediately follow a select() on the device indicating it's ready to read. Signed-off-by: John Levon <john.levon@sun.com>
* Use common code for enabling tracing via xenmon and xentrace, also fixingkaf24@firebug.cl.cam.ac.uk2006-05-161-62/+25
| | | | | | | the last two remaining xc_private.h users outside of libxc. Signed-off-by: John Levon <john.levon@sun.com>
* Move Linux-specific privcmd code into private libxc implementations.kaf24@firebug.cl.cam.ac.uk2006-05-021-2/+1
| | | | | | | | | Make header path for kernel's privcmd/evtchn headers generic. Remove pointless xi_*() interface that was using private libxc interfaces. Signed-off-by: John Levon <john.levon@sun.com>
* Check a write() return value in xenbaked.kaf24@firebug.cl.cam.ac.uk2006-04-271-1/+4
| | | | | | | From: Jeremy Katz Signed-off-by: Keir Fraser <keir@xensource.com>
* This is a patch for XenMon which only applies to the userspace tools. kaf24@firebug.cl.cam.ac.uk2006-04-144-92/+284
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary purpose of this patch is to add support for non-polling access to the xen trace buffers. The hypervisor changes have already been accepted. Also included are a few bug fixes and some minor new features: 1. If xenmon is run without first allocating trace buffers (via 'setsize') and enabling them (via 'tbctl'), then this is done automatically using sensible defaults. 2. There was a bug that caused the first second's worth of data output from xenmon to be erroneous; This has been fixed. 3. There was a bug that caused xenmon to sometimes not display data for newly created domains; This has also been fixed. 4. The xenmon display has a 'heartbeat' which flickers once per second. This is to show that xenmon is still alive, even though the display isn't changing at all, a situation that can happen sometimes when there is nothing at all happening on a particular cpu. 5. Added cpu utilization display to the top of the xenmon window. 6. Added a bunch of options in xenmon to control exactly which metrics are displayed, so the screen doesn't get cluttered with stuff you're not interested in. The new options are: --allocated --noallocated --blocked --noblocked --waited --nowaited --excount --noexcount --iocount --noiocount 7. Added an option ("--cpu=N") to xenmon to specify which physical cpu you'd like data displayed for. 8. Updated the README with information about default trace buffer size, etc. Signed-off-by: Rob Gardner <rob.gardner@hp.com>
* build: Clean up use of .PHONYkaf24@firebug.cl.cam.ac.uk2006-04-101-0/+4
| | | | | | | | | | | | * Move .PHONY directives next to targets, this makes them a lot harder to miss * Add missing .PHONY directives * Remove nonexistent .PHONY directives * Hopefully I didn'T miss anything... Signed-Off-By: Horms <horms@verge.net.au>
* More build config changes:kaf24@firebug.cl.cam.ac.uk2006-03-101-2/+2
| | | | | | | | | | - Build -O2 rather than -O3 - Build with -Wstrict-prototypes - Move target-specific generic compiler switches to Config.mk Signed-off-by: Keir Fraser <keir@xensource.com>
* Clean up the usage of CFLAGS. This is nice for packagers, who wouldkaf24@firebug.cl.cam.ac.uk2006-03-091-1/+1
| | | | | | | | like to control the base compilation flags from a central place. Signed-off-by: Charles Coffing <ccoffing@novell.com>