aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstat
Commit message (Collapse)AuthorAgeFilesLines
* xenstat: Fix buffer over-run with new_domains being negative.Konrad Rzeszutek Wilk2013-09-131-5/+9
| | | | | | | | | | | | | Coverity identified this as: CID 1055740 Out-of-bounds read - "In xenstat_get_node: Out-of-bounds read from a buffer (CWE-125)" And sure enough, if xc_domain_getinfolist returns us -1, we will try to use it later on in the for (i = 0; i < new_domains; ..) loop. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
* tools/xenstat/libxenstat: Remove src/libxenstat.a file during make cleanDaniel Kiper2013-05-081-1/+1
| | | | | Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools: Fix memset(&p,0,sizeof(p)) idiom in several places.Michael Young2013-02-131-1/+1
| | | | | | | | | 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>
* xentop.c: Change curses painting behavior to avoid flickerJason McCarver2012-09-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | Currently, xentop calls clear() before drawing the screen and calling refresh(). This causes the entire screen to be repainted from scratch on each call to refresh(). It is inefficient and causes visible flicker when using xentop. This patch fixes this by calling erase() instead of clear() which overwrites the current screen with blanks instead. The screen is then drawn as usual in the top() function and refresh() is called. This method allows curses to only repaint the characters that have changed since the last call to refresh(), thus avoiding the flicker and sending fewer characters to the terminal. In the event the screen becomes corrupted, this patch accepts a CTRL-L keystroke from the user which will call clear() and force a repaint of the entire screen. Signed-off-by: Jason McCarver <slam@parasite.cc> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* xen: update xensource.com to xen.orgAndrew Cooper2012-07-262-2/+2
| | | | | | | | | | | | This patch was constructed by grepping for xensource.com over the entire repository and eyeballing which ones were sensible to update. In addition, the xen-tools mailing list has been deprecated, so update xentop to refer to xen-devel instead. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
* nstore: rename public xenstore headersIan Campbell2012-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | The xenstore header xs.h is producing conflicts with other software[1]. xs is a too short identifier and does not matche the library. Renaming the headers to xenstore.h and xenstore_lib.h is the easiest way to make them easy recognizable and prevent furthe problems. [1]: http://bugs.debian.org/668550 [ Also update QEMU_TAG, to bring in corresponding change to qemu-xen-traditional. -iwj ] Signed-off-by: Bastian Blank <waldi@debian.org> 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> --HG-- rename : tools/xenstore/xs.h => tools/xenstore/xenstore.h rename : tools/xenstore/xs_lib.h => tools/xenstore/xenstore_lib.h
* xenstat: Use local domain namesDaniel De Graaf2012-03-131-10/+2
| | | | | | | | | | The domain name stored in /local/domain/$domid/name is simpler to access and is the only domain name modified by "xl rename". Use this domain name in libxenstat's reporting. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* autoconf: add check for curses libraryRoger Pau Monne2012-03-132-1/+10
| | | | | | | | | | | | Check for a curses compatible library (curses or ncurses basically). One of those is needed to compile Xen tools (gtraceview and xentop). Modify Makefiles/sources to use configure output (fetch CURSES_LIBS from tools/Tools.mk and header to include from tools/config.h) Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
* tools/build: Introduce {PREPEND,APPEND}_{LIB,INCLUDES}Roger Pau Monne2011-11-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | 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 $(CFLAGS) from links lines.Ian Campbell2011-03-311-10/+1
| | | | | | | | 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/xenstat: 23075:b4351d57464b added libxenstat.so but didn't build fPICIan Campbell2011-03-241-0/+1
| | | | | | | | | This broke on x86_64. Reported-by: Olaf Hering 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: xenstat: install and use shared libraryIan Campbell2011-03-232-22/+12
| | | | | | | | Remove .so files from the .a file. 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: consistently use $({CFLAGS,LDLIBS}_libxenstore) instead of open coding.Ian Campbell2011-03-211-2/+2
| | | | | | 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: consistently use $({CFLAGS,LDLIBS}_libxenctrl) instead of open coding.Ian Campbell2011-03-211-3/+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: consistently use $(CFLAGS_xeninclude) instead of open coding.Ian Campbell2011-03-211-1/+1
| | | | | | | | Renamed from the slightly ambiguous CFLAGS_include. 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-173-3/+3
| | | | | | | | 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>
* 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>
* libxc: eliminate static variables, use xentoollog; API changeKeir Fraser2010-05-282-3/+3
| | | | | | | | | | | | | | | | | | | | 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>
* xentop: fix NULL pointer dereferenceKeir Fraser2010-05-201-13/+15
| | | | | | | | | 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>
* Fix Makefile targets that generate several files at onceKeir Fraser2010-03-051-2/+4
| | | | | | | | | | | | | | | | | | | | 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>
* xentop: tmem: no stats for non-tmem domainsKeir Fraser2010-03-031-2/+3
| | | | | | | 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>
* tmem, xentop: Report a few key per-domain tmem statistics in xentop.Keir Fraser2009-12-094-0/+113
| | | | Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* xentop: Allow full domain name displayKeir Fraser2009-12-021-2/+11
| | | | | | | | | | | 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>
* xenstat: Fixes for 20528:e6e3bf767d16 (stats for dom0 network bonding)Keir Fraser2009-12-021-198/+204
| | | | | | | | | | | | | 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>
* xentop: Add tmem-freeable info when tmem is activeKeir Fraser2009-12-014-3/+23
| | | | | | (No change to xentop output when tmem is inactive.) Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
* xenstat: Linux dom0 statistics for case we use network bondingKeir Fraser2009-12-011-33/+227
| | | | | | | | | | 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>
* xentop: Add two more VBD statisticsKeir Fraser2009-11-055-24/+99
| | | | | | | | 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>
* xenstat: Use backend path which is compatible with pvops and 2.6.18-xen kernels.Keir Fraser2009-07-071-1/+1
| | | | Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
* Use -MMD -MF in tools/* rather than -Wp,-M...Keir Fraser2009-01-122-2/+6
| | | | | | | | | | | | | | | | | | | | | | 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>
* xentop: Fix fprintf() build failure.Keir Fraser2008-12-111-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* xentop: Fix xentop for blktapKeir Fraser2008-12-031-19/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* xentop: Fix display of long domain names.Keir Fraser2008-09-221-1/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* Fix a few typosKeir Fraser2008-08-041-1/+1
| | | | | From: Diego Ongaro <diego.ongaro@eu.citrix.com> Acked-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* tools: use $(PREFIX) rather than hard-coding /usrKeir Fraser2008-07-241-1/+1
| | | | Signed-off-by: Jan Beulich <jbeulich@novell.com>
* xentop: declare signal handler as staticKeir Fraser2008-07-141-1/+1
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xenstat: some cleanupsKeir Fraser2008-06-102-4/+6
| | | | | | | | sprintf -> snprintf malloc(n * m) -> calloc(n, m) get rid of a cast Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* libxenstat: Fix statistics for blktap disks on linuxKeir Fraser2008-06-101-7/+19
| | | | | | | | | | | | | | | | | | | 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
* Fix domain names that xentop showsKeir Fraser2008-05-261-4/+12
| | | | | | | | 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>
* tools/xenstat build: Use generic subdirs rules.Keir Fraser2008-03-251-4/+1
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Add periodic fflush to xentop batch mode.Keir Fraser2008-03-181-0/+1
| | | | | From: Yusuke KANEKI <Kaneki.Yusuke@ea.MitsubishiElectric.co.jp> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* tools: Compile xentop only if curses are available.Keir Fraser2008-03-041-0/+2
| | | | Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
* Fix libxenstat on SolarisKeir Fraser2008-02-271-33/+7
| | | | | | | 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>
* Move generation of public header hierarchy into the tools.Keir Fraser2008-01-261-1/+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 MANDIR, MAN1DIR and MAN8DIR. Use it.Keir Fraser2008-01-221-6/+2
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* Add SBINDIR. Use it always.Keir Fraser2008-01-221-2/+2
| | | | Signed-off-by: Bastian Blank <waldi@debian.org>
* xentop: build fix for *bsd.Keir Fraser2007-10-231-1/+1
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Replace sysctl.physinfo.sockets_per_node with more directly usefulKeir Fraser2007-10-191-3/+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>
* xentop: Flush batch output on SIGTERM or SIGINT.Keir Fraser2007-10-021-8/+24
| | | | Signed-off-by: INAKOSHI Hiroya <inakoshi.hiroya@jp.fujitsu.com>
* Missed files in previous changeset.Keir Fraser2007-09-241-0/+97
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* xenstat/xenstore: NetBSD fixes.Keir Fraser2007-09-242-3/+7
| | | | Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>