aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstat/libxenstat/src/xenstat_linux.c
Commit message (Collapse)AuthorAgeFilesLines
* 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: 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>
* 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>
* 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-051-0/+12
| | | | | | | | 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>
* 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>
* xenstat: some cleanupsKeir Fraser2008-06-101-1/+2
| | | | | | | | 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
* xenstat: Adding to scan blktap information.kfraser@localhost.localdomain2007-06-071-4/+10
| | | | Signed-off-by: Satoshi UCHIDA <s-uchida@ap.jp.nec.com>
* Fix stale email addresses in xenstat and xentop.kfraser@localhost.localdomain2007-05-311-3/+3
| | | | | | | | | | | | 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>
* xenstat: Remove the "vbd-%d-%d is a VBD." debugging statement.Keir Fraser2007-05-071-3/+1
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Implement VBD and VIF handling on Solaris for libxenstat.kfraser@localhost.localdomain2007-02-231-0/+265
Also, fix up a confusion with ERR that was breaking xentop. Signed-off-by: John Levon <john.levon@sun.com>