ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/libstatgrab/disk_stats.c
Revision 1.89 - (view) (annotate) - [select for diffs]
Sun Oct 3 18:35:57 2010 UTC (13 years, 6 months ago) by tdb
Branch: MAIN
CVS Tags: HEAD
Changes since 1.88: +235 -15 lines
Diff to previous 1.88
Add support for AIX 5.x - 9.x.

Many thanks to Jens Rehsack <rehsack@googlemail.com> for providing the
patch for this work. Thanks!

Revision 1.88 - (view) (annotate) - [select for diffs]
Fri Dec 4 22:09:30 2009 UTC (14 years, 4 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_17
Changes since 1.87: +31 -4 lines
Diff to previous 1.87
Make list of valid filesystem types dynamic on FreeBSD. Based on patch
by Baptiste Daroussin.

Revision 1.87 - (view) (annotate) - [select for diffs]
Sat May 16 01:01:31 2009 UTC (14 years, 11 months ago) by tdb
Branch: MAIN
Changes since 1.86: +2 -2 lines
Diff to previous 1.86
FreeBSD has zfs these days.

Revision 1.86 - (view) (annotate) - [select for diffs]
Sun Aug 3 17:43:26 2008 UTC (15 years, 8 months ago) by tdb
Branch: MAIN
Changes since 1.85: +2 -2 lines
Diff to previous 1.85
Add zfs to allowed FSs on Solaris.

Revision 1.85 - (view) (annotate) - [select for diffs]
Mon Oct 9 14:09:38 2006 UTC (17 years, 6 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_14, LIBSTATGRAB_0_15, LIBSTATGRAB_0_16
Changes since 1.84: +2 -1 lines
Diff to previous 1.84
Make sure we always close kstat.

Spotted by: "Javier Donaire" <jyuyu@fraguel.org> (in load_stats.c)

Revision 1.84 - (view) (annotate) - [select for diffs]
Fri Mar 17 13:29:26 2006 UTC (18 years, 1 month ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_13
Changes since 1.83: +3 -3 lines
Diff to previous 1.83
Have nfs be a legal filesystem type on all platforms.

Revision 1.83 - (view) (annotate) - [select for diffs]
Sat Sep 24 13:29:22 2005 UTC (18 years, 7 months ago) by tdb
Branch: MAIN
Changes since 1.82: +115 -5 lines
Diff to previous 1.82
Add WIN32 support via MINGW. We'll need to add stuff to the README file
about what this requires to build.

All the hard work done by: skel

Revision 1.82 - (view) (annotate) - [select for diffs]
Wed Jul 13 13:01:24 2005 UTC (18 years, 9 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_12
Changes since 1.81: +69 -68 lines
Diff to previous 1.81
Add more fs stats.

Patches provided by: Roman Neuhauser

Revision 1.81 - (view) (annotate) - [select for diffs]
Wed Apr 13 11:50:31 2005 UTC (19 years ago) by ats
Branch: MAIN
Changes since 1.80: +23 -7 lines
Diff to previous 1.80
Rework Linux partition detection to detect devices called "c0d0" (etc.)
and not assume they're partitions -- the DAC* and Compaq RAID devices do
this.

Revision 1.80 - (view) (annotate) - [select for diffs]
Thu Feb 24 12:34:45 2005 UTC (19 years, 2 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_11_1
Changes since 1.79: +5 -5 lines
Diff to previous 1.79
Add NFS to list of file systems that we return information for.

Revision 1.79 - (view) (annotate) - [select for diffs]
Sun Nov 7 15:06:49 2004 UTC (19 years, 5 months ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_11
Changes since 1.78: +6 -3 lines
Diff to previous 1.78
HP-UX disk IO calculation, version 3.

Revision 1.78 - (view) (annotate) - [select for diffs]
Sat Nov 6 23:54:12 2004 UTC (19 years, 5 months ago) by tdb
Branch: MAIN
Changes since 1.77: +2 -2 lines
Diff to previous 1.77
Cast numbers to be the same type when doing a comparison.

Revision 1.77 - (view) (annotate) - [select for diffs]
Sat Nov 6 15:36:29 2004 UTC (19 years, 5 months ago) by ats
Branch: MAIN
Changes since 1.76: +3 -1 lines
Diff to previous 1.76
Add a FIXME (it'd be preferable to avoid the /dev/dsk search when
possible).

Revision 1.76 - (view) (annotate) - [select for diffs]
Sat Nov 6 15:33:40 2004 UTC (19 years, 5 months ago) by ats
Branch: MAIN
Changes since 1.75: +2 -2 lines
Diff to previous 1.75
Fix IO bytes calculation -- the value returned is in 16-bit words, so
divide by two to get bytes.

Revision 1.75 - (view) (annotate) - [select for diffs]
Sat Nov 6 15:32:33 2004 UTC (19 years, 5 months ago) by ats
Branch: MAIN
Changes since 1.74: +67 -61 lines
Diff to previous 1.74
Rework the HP-UX disk stats code to fetch batches of disks. (Untested.)

Revision 1.74 - (view) (annotate) - [select for diffs]
Mon Nov 1 20:36:46 2004 UTC (19 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73
Correct comment.

Revision 1.73 - (view) (annotate) - [select for diffs]
Mon Nov 1 18:30:17 2004 UTC (19 years, 6 months ago) by tdb
Branch: MAIN
Changes since 1.72: +107 -6 lines
Diff to previous 1.72
Merge in patch to provide support for HP-UX 11.11.

Contributed by Roy Keene - thanks Roy!

Revision 1.72 - (view) (annotate) - [select for diffs]
Sun Jul 18 21:30:11 2004 UTC (19 years, 9 months ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_10_1, LIBSTATGRAB_0_10_2, LIBSTATGRAB_0_10_3
Changes since 1.71: +11 -9 lines
Diff to previous 1.71
Use sg_set_error_with_errno whenever errno's valid.
Change the one user of SG_ERROR_ENOENT to SG_ERROR_SYSCTL instead (since
that's what it should have been).

Revision 1.71 - (view) (annotate) - [select for diffs]
Mon Jun 21 16:40:26 2004 UTC (19 years, 10 months ago) by tdb
Branch: MAIN
Changes since 1.70: +2 -2 lines
Diff to previous 1.70
Let libstatgrab know about the veritas file system (vxfs).

Revision 1.70 - (view) (annotate) - [select for diffs]
Sun Jun 20 20:32:24 2004 UTC (19 years, 10 months ago) by tdb
Branch: MAIN
Changes since 1.69: +5 -1 lines
Diff to previous 1.69
On NetBSD 2.0 (in fact, all BSD's, but only know of NetBSD 2.0) use statvfs
instead of statfs when available.

No guarantees I've got this right - I need to upgrade our NetBSD 2 test
machine to a more recent build.

Revision 1.69 - (view) (annotate) - [select for diffs]
Sun Jun 20 17:00:25 2004 UTC (19 years, 10 months ago) by tdb
Branch: MAIN
Changes since 1.68: +8 -2 lines
Diff to previous 1.68
Since OpenBSD 3.5 disk io stats have been seperated into read and write,
just like NetBSD. This fixes libstatgrab to work on 3.5+.

Bug reported by Wijnand Wiersma and Christian Weisgerber.

Revision 1.68 - (view) (annotate) - [select for diffs]
Thu Apr 8 14:30:43 2004 UTC (20 years ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_10
Changes since 1.67: +6 -6 lines
Diff to previous 1.67
Fix bugs in error code.

Revision 1.67 - (view) (annotate) - [select for diffs]
Thu Apr 8 13:44:44 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.66: +22 -1 lines
Diff to previous 1.66
Add comparison functions for names where that's likely to be useful.

Make the network_iface_stats example show how to use bsearch to find an
interface by name.

Revision 1.66 - (view) (annotate) - [select for diffs]
Wed Apr 7 19:26:16 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.65: +28 -5 lines
Diff to previous 1.65
Error reporting for disk_stats.

Revision 1.65 - (view) (annotate) - [select for diffs]
Wed Apr 7 14:53:40 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.64: +22 -22 lines
Diff to previous 1.64
Whitespace tidyup - change spaces to tabs.

Revision 1.64 - (view) (annotate) - [select for diffs]
Wed Apr 7 10:33:50 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.63: +5 -5 lines
Diff to previous 1.63
Change malloc -> sg_malloc, realloc -> sg_realloc, and rewrite the one
calloc call to use sg_malloc.

Revision 1.63 - (view) (annotate) - [select for diffs]
Tue Apr 6 14:52:58 2004 UTC (20 years ago) by tdb
Branch: MAIN
Changes since 1.62: +2 -2 lines
Diff to previous 1.62
Update name of project at the top of all soure files. These files now exist
in their own right, rather than as part of the "CMS".

Revision 1.62 - (view) (annotate) - [select for diffs]
Mon Apr 5 18:10:11 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.61: +14 -14 lines
Diff to previous 1.61
Make sg_update_string return an int to indicate success, so that it can
be used to set a string to NULL.

Make Linux process_stats code set proctitle to NULL if it's empty rather
than "".

Revision 1.61 - (view) (annotate) - [select for diffs]
Mon Apr 5 15:40:15 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.60: +33 -33 lines
Diff to previous 1.60
Rename all the functions, types and enums in the API to be consistent.
Types are now of the form "sg_mem_stats"; functions of the form
"sg_get_mem_stats"; enums of the form "SG_PROCESS_STATE_RUNNING".
(The old get_proc_snapshot follows the usual calling convention now.)

Make internal functions static where possible.

Rename non-static internal functions to have an sg_ prefix so they don't
collide with those from other libraries. In particular, strlcpy and
strlcat are now called sg_strlcpy and sg_strlcat and are always
included.

Fix saidar and statgrab to use the new API.

Revision 1.60 - (view) (annotate) - [select for diffs]
Mon Apr 5 00:07:37 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.59: +21 -19 lines
Diff to previous 1.59
Use update_string throughout.

Revision 1.59 - (view) (annotate) - [select for diffs]
Sun Apr 4 23:55:48 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.58: +10 -23 lines
Diff to previous 1.58
I like copy_string. We should use it EVERYWHERE. Also, the name needed
changing.

Revision 1.58 - (view) (annotate) - [select for diffs]
Sun Apr 4 23:26:23 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.57: +4 -10 lines
Diff to previous 1.57
Convert another realloc-managed static array to a vector.

Revision 1.57 - (view) (annotate) - [select for diffs]
Sun Apr 4 22:29:54 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.56: +19 -21 lines
Diff to previous 1.56
Make copy_string not leak memory on realloc() failure.
Make copy_string static.

We probably ought to move copy_string to tools.c/h at some point in the
future, since it's useful.

Revision 1.56 - (view) (annotate) - [select for diffs]
Sun Apr 4 22:18:38 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.55: +35 -81 lines
Diff to previous 1.55
Make disk_stats use vectors.

(Note that this introduces some harmless strict aliasing warnings on GCC
3.3; I'll do something about that later.)

Revision 1.55 - (view) (annotate) - [select for diffs]
Sun Apr 4 21:38:02 2004 UTC (20 years ago) by ats
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54
Silence a (harmless) "may be used uninitialised" error.

Revision 1.54 - (view) (annotate) - [select for diffs]
Fri Mar 19 23:44:30 2004 UTC (20 years, 1 month ago) by ats
Branch: MAIN
Changes since 1.53: +4 -4 lines
Diff to previous 1.53
People using devfs have partition names longer than 20 characters.

Revision 1.53 - (view) (annotate) - [select for diffs]
Mon Feb 16 14:55:32 2004 UTC (20 years, 2 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_9
Changes since 1.52: +4 -4 lines
Diff to previous 1.52
Add support for DragonFly BSD 1.0.
Also a minor tweak to the network interface code to make it more portable.

Revision 1.52 - (view) (annotate) - [select for diffs]
Fri Feb 13 16:46:21 2004 UTC (20 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.51: +41 -2 lines
Diff to previous 1.51
Finish support for OpenBSD.

Get disknames out of sysctl as well for Disk IO.
Fix memory/page/swap stats to use get_uvmexp in tools.c (same as NetBSD).

Revision 1.51 - (view) (annotate) - [select for diffs]
Thu Feb 12 23:04:52 2004 UTC (20 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.50: +32 -6 lines
Diff to previous 1.50
Add preliminary support for OpenBSD (tested on 3.3).

All works apart from Disk IO stats - currently the disks are not named
correctly. The fix for this is probably to use KVM.

Mostly similar to the NetBSD code, the notable exception being the uvm
stuff. In NetBSD there's a function to get it, in OpenBSD sysctl is needed
to get hold of it.

Revision 1.50 - (view) (annotate) - [select for diffs]
Wed Jan 21 23:46:54 2004 UTC (20 years, 3 months ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_8_2
Changes since 1.49: +50 -53 lines
Diff to previous 1.49
Tidy up get_network_stats_diff and get_diskio_stats_diff.

Revision 1.49 - (view) (annotate) - [select for diffs]
Mon Jan 19 16:49:21 2004 UTC (20 years, 3 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_8_1
Changes since 1.48: +2 -0 lines
Diff to previous 1.48
A whole bunch of minor cosmetic changes.

Revision 1.48 - (view) (annotate) - [select for diffs]
Fri Jan 16 15:54:54 2004 UTC (20 years, 3 months ago) by tdb
Branch: MAIN
Changes since 1.47: +13 -12 lines
Diff to previous 1.47
Alter the licensing of libstatgrab. The library part is now under the
LGPL, whilst the tools/examples are under the GPL. Both licenses are
included in the distribution (and are both now in CVS). Also made a
minor alteration to the webpage where it said everything was licensed
under the GPL.

Revision 1.47 - (view) (annotate) - [select for diffs]
Sat Jan 10 16:25:51 2004 UTC (20 years, 3 months ago) by ats
Branch: MAIN
Changes since 1.46: +3 -0 lines
Diff to previous 1.46
Add a couple of missing checks for NULL return values; this fixes the
crash when libstatgrab runs out of FDs.

Revision 1.46 - (view) (annotate) - [select for diffs]
Sat Jan 10 16:12:34 2004 UTC (20 years, 3 months ago) by ats
Branch: MAIN
Changes since 1.45: +1 -0 lines
Diff to previous 1.45
Don't close f twice.

Revision 1.45 - (view) (annotate) - [select for diffs]
Fri Jan 9 12:32:36 2004 UTC (20 years, 3 months ago) by ats
Branch: MAIN
Changes since 1.44: +4 -5 lines
Diff to previous 1.44
Oops, yes. f can't be NULL at that point, though.
Fix unterminated comment.

Revision 1.44 - (view) (annotate) - [select for diffs]
Fri Jan 9 10:06:01 2004 UTC (20 years, 3 months ago) by pajs
Branch: MAIN
Changes since 1.43: +4 -0 lines
Diff to previous 1.43
Fixed leaking fd in diskio_stats code. Fixed a potential leak in page_stats.

Revision 1.43 - (view) (annotate) - [select for diffs]
Thu Nov 20 12:13:12 2003 UTC (20 years, 5 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_8
Changes since 1.42: +1 -1 lines
Diff to previous 1.42
Turn on the solaris disk mapping code. Fix some minor bugs, and remove
some debugging code.

Revision 1.42 - (view) (annotate) - [select for diffs]
Wed Nov 12 01:36:19 2003 UTC (20 years, 5 months ago) by ats
Branch: MAIN
Changes since 1.41: +4 -0 lines
Diff to previous 1.41
Make libstatgrab functions return NULL for stats that can't be fetched
on cygwin.

Revision 1.41 - (view) (annotate) - [select for diffs]
Mon Nov 10 23:32:59 2003 UTC (20 years, 5 months ago) by ats
Branch: MAIN
Changes since 1.40: +16 -23 lines
Diff to previous 1.40
Factor out duplicated code that checks for valid FS types.

Revision 1.40 - (view) (annotate) - [select for diffs]
Mon Nov 10 23:25:45 2003 UTC (20 years, 5 months ago) by ats
Branch: MAIN
Changes since 1.39: +14 -11 lines
Diff to previous 1.39
Make Cygwin its own platform, rather than defining LINUX. This stops
libstatgrab from trying to fetch stats that Cygwin doesn't have.

Revision 1.39 - (view) (annotate) - [select for diffs]
Mon Nov 10 21:07:04 2003 UTC (20 years, 5 months ago) by tdb
Branch: MAIN
Changes since 1.38: +10 -2 lines
Diff to previous 1.38
Add support for cygwin. This is a bit limited, there's a few things that
can't be retrieved on cygwin such as load averages, diskio, network io,
and process stats. The package compiles and runs, and both saidar and
statgrab work.

Taken from a patch submitted by Ron Arts <raarts@netland.nl>. Thanks Ron!

Revision 1.38 - (view) (annotate) - [select for diffs]
Fri Oct 24 17:46:44 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.37: +20 -11 lines
Diff to previous 1.37
Support disk IO statistics on Linux 2.6.
Remove a couple of unused variables.

Revision 1.37 - (view) (annotate) - [select for diffs]
Sun Oct 19 21:22:09 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_7
Changes since 1.36: +1 -1 lines
Diff to previous 1.36
Correct comment about where dk_rbytes is available.

Revision 1.36 - (view) (annotate) - [select for diffs]
Sun Oct 19 21:12:43 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.35: +2 -1 lines
Diff to previous 1.35
Update VALID_FS_TYPES for FreeBSD (at least, those that I can see from
a quick look at src/sys).

Revision 1.35 - (view) (annotate) - [select for diffs]
Sun Oct 19 21:06:55 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.34: +3 -1 lines
Diff to previous 1.34
Update VALID_FS_TYPES for NetBSD.

Revision 1.34 - (view) (annotate) - [select for diffs]
Sun Oct 19 12:04:05 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.33: +67 -3 lines
Diff to previous 1.33
Implement diskio stats on NetBSD. Tested on 1.6, but should work on 1.6.1
(and give more useful output, since 1.6.1 seperates read and write statistics).

Revision 1.33 - (view) (annotate) - [select for diffs]
Sun Oct 19 11:23:21 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.32: +1 -1 lines
Diff to previous 1.32
Avoid bzero(NULL, ...) on malloc failure.

Revision 1.32 - (view) (annotate) - [select for diffs]
Sun Oct 19 11:15:30 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.31: +5 -1 lines
Diff to previous 1.31
Update the Linux VALID_FS_TYPES list based on the writable disk-based
filesystems in 2.4.22 (plus xfs and jfs).

Revision 1.31 - (view) (annotate) - [select for diffs]
Sun Oct 19 02:03:02 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.30: +13 -5 lines
Diff to previous 1.30
Initial support for NetBSD. This adds NetBSD support for everything
except diskio stats (since they're even more disturbingly complex to get
at on NetBSD than the three OSs we already support). Tested against
NetBSD 1.6 on i386.

Revision 1.30 - (view) (annotate) - [select for diffs]
Sun Oct 19 00:10:30 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.29: +1 -0 lines
Diff to previous 1.29
Fix warning when building on Linux.

Revision 1.29 - (view) (annotate) - [select for diffs]
Sat Oct 18 22:16:44 2003 UTC (20 years, 6 months ago) by ats
Branch: MAIN
Changes since 1.28: +4 -1 lines
Diff to previous 1.28
Fix a little bit of slightly-confused comment formatting.

Revision 1.28 - (view) (annotate) - [select for diffs]
Thu Oct 9 15:22:59 2003 UTC (20 years, 6 months ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_6, LIBSTATGRAB_0_6_1
Changes since 1.27: +5 -3 lines
Diff to previous 1.27
Fixed a forgotten line from the patch

Revision 1.27 - (view) (annotate) - [select for diffs]
Thu Oct 9 14:59:52 2003 UTC (20 years, 6 months ago) by pajs
Branch: MAIN
Changes since 1.26: +14 -1 lines
Diff to previous 1.26
Freebsd 5 patch for disk stats. Thanks to Tim Bishop for doing the hard
work on this patch.

Revision 1.26 - (view) (annotate) - [select for diffs]
Wed Oct 8 09:20:56 2003 UTC (20 years, 6 months ago) by tdb
Branch: MAIN
Changes since 1.25: +1 -151 lines
Diff to previous 1.25
Unroll Pete's commits for doing drive mappings on Solaris. It doesn't
work right and he wants to start again. Also, we don't want it in the
next release :) This effectively removes revisions 1.22 and 1.23.

Revision 1.25 - (view) (annotate) - [select for diffs]
Tue Oct 7 20:32:50 2003 UTC (20 years, 6 months ago) by tdb
Branch: MAIN
Changes since 1.24: +1 -0 lines
Diff to previous 1.24
Further following of the manpage:

"getdevs() expects the statinfo structure to be allocated, and it also
expects the dinfo subelement to be allocated and zeroed prior to the
first invocation of getdevs()."

This finally makes saider work on FreeBSD.

Revision 1.24 - (view) (annotate) - [select for diffs]
Tue Oct 7 19:58:37 2003 UTC (20 years, 6 months ago) by tdb
Branch: MAIN
Changes since 1.23: +0 -1 lines
Diff to previous 1.23
Don't free stats.dinfo. If it used to store state between calls of
getdevs it probably doesn't make sense to free it at the end of the
first call of the function :)

This follows Adam's last commit on this bit of which made sure we
didn't reinitialise stats.dinfo every time round the loop.

Revision 1.23 - (view) (annotate) - [select for diffs]
Fri Sep 26 22:30:48 2003 UTC (20 years, 7 months ago) by pajs
Branch: MAIN
Changes since 1.22: +1 -0 lines
Diff to previous 1.22
Bug fix on systems with large path_to_inst files.

Revision 1.22 - (view) (annotate) - [select for diffs]
Fri Sep 26 16:33:51 2003 UTC (20 years, 7 months ago) by pajs
Branch: MAIN
Changes since 1.21: +150 -1 lines
Diff to previous 1.21
Added drive mapping for solaris from the old sunos names, to the more
modern solaris names.

E.g.

ssd0 to c0t0d0s0

This is rather more useful :)

Revision 1.21 - (view) (annotate) - [select for diffs]
Tue Sep 9 08:43:33 2003 UTC (20 years, 7 months ago) by ats
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_5_1
Changes since 1.20: +7 -3 lines
Diff to previous 1.20
Fix FreeBSD segfault. From the getdevs() man page: "The dinfo subelement
is used to store state between calls, and should not be modified after
the first call to getdevs()."

Revision 1.20 - (view) (annotate) - [select for diffs]
Thu Aug 28 23:05:56 2003 UTC (20 years, 8 months ago) by ats
Branch: MAIN
Changes since 1.19: +122 -61 lines
Diff to previous 1.19
Make disk_stats read /proc/partitions on Linux, which contains information for
  all disks on recent 2.4 kernels. (It'll fall back to /proc/stat if it can't
  find the information there.)

Revision 1.19 - (view) (annotate) - [select for diffs]
Thu Aug 28 21:33:42 2003 UTC (20 years, 8 months ago) by ats
Branch: MAIN
Changes since 1.18: +0 -1 lines
Diff to previous 1.18
Don't fclose(NULL).

Revision 1.18 - (view) (annotate) - [select for diffs]
Sun Aug 24 20:24:09 2003 UTC (20 years, 8 months ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_5
Changes since 1.17: +2 -2 lines
Diff to previous 1.17
Tidy up of lots of little things. :)

Revision 1.17 - (view) (annotate) - [select for diffs]
Sat Apr 5 23:56:25 2003 UTC (21 years ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_4
Changes since 1.16: +46 -2 lines
Diff to previous 1.16
Should now work on freebsd.

Revision 1.16 - (view) (annotate) - [select for diffs]
Fri Apr 4 14:25:26 2003 UTC (21 years ago) by pajs
Branch: MAIN
Changes since 1.15: +52 -0 lines
Diff to previous 1.15
Disk stats for freebsd. This does not currently include diskio stats.

Revision 1.15 - (view) (annotate) - [select for diffs]
Mon Mar 31 11:30:54 2003 UTC (21 years, 1 month ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_3_4
Changes since 1.14: +1 -0 lines
Diff to previous 1.14
Fixed some issues with not closing FILE*'s.

Revision 1.14 - (view) (annotate) - [select for diffs]
Tue Mar 11 12:57:07 2003 UTC (21 years, 1 month ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_3_1, LIBSTATGRAB_0_3_2, LIBSTATGRAB_0_3_3
Changes since 1.13: +2 -0 lines
Diff to previous 1.13
Bug fix, again :) .. I wasn't reporting the time taken since last statgrab
correctly. So got very busy disks apparently ;)

Revision 1.13 - (view) (annotate) - [select for diffs]
Fri Mar 7 20:17:07 2003 UTC (21 years, 1 month ago) by tdb
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_3
Changes since 1.12: +1 -1 lines
Diff to previous 1.12
Added tools.c and tools.h to the Makefile. It now compiles ok on both
Solaris and Linux. Also fixed a minor compile bug in disk_stats.c - I
did check the history in CVS, and it used to be like this. The bug got
introduced in the Linux changes.

Revision 1.12 - (view) (annotate) - [select for diffs]
Wed Mar 5 17:11:22 2003 UTC (21 years, 1 month ago) by pajs
Branch: MAIN
Changes since 1.11: +5 -1 lines
Diff to previous 1.11
Linux reports stupid results. Fixed to return real vaules. Side note, gkrellm
is doing it wrong ;)

Revision 1.11 - (view) (annotate) - [select for diffs]
Wed Mar 5 12:41:19 2003 UTC (21 years, 1 month ago) by pajs
Branch: MAIN
Changes since 1.10: +22 -3 lines
Diff to previous 1.10
Working linux diskio stats. Fixed bug in tools.c

Revision 1.10 - (view) (annotate) - [select for diffs]
Tue Mar 4 18:06:16 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.9: +66 -4 lines
Diff to previous 1.9
Diskio stats for linux. Not been checked. Relies on tools.c (seperate comit)
If someone knows a nicer way of getting the device name, please tell me, as
the way im doing it is horrible! :)

Revision 1.9 - (view) (annotate) - [select for diffs]
Tue Mar 4 12:55:14 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.8: +65 -10 lines
Diff to previous 1.8
disk_stats for linux. Does not do diskio stats yet.

Revision 1.8 - (view) (annotate) - [select for diffs]
Sat Mar 1 02:41:54 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
CVS Tags: LIBSTATGRAB_0_2
Changes since 1.7: +2 -1 lines
Diff to previous 1.7
Bug fix

Revision 1.7 - (view) (annotate) - [select for diffs]
Fri Feb 28 22:59:35 2003 UTC (21 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.6: +1 -5 lines
Diff to previous 1.6
Tidy up of configure script, and includes.

Revision 1.6 - (view) (annotate) - [select for diffs]
Sun Feb 23 23:28:19 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.5: +1 -1 lines
Diff to previous 1.5
Changed function name changed to be consistent.

Revision 1.5 - (view) (annotate) - [select for diffs]
Sun Feb 23 22:58:08 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.4: +73 -10 lines
Diff to previous 1.4
Added a diff diskio_stats and fixed a bug. This is the last thing needed
for the solaris version of the new libstatgrab, bar bug fixes.

Revision 1.4 - (view) (annotate) - [select for diffs]
Sun Feb 23 19:24:07 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.3: +86 -3 lines
Diff to previous 1.3
Added support for read/write stats on a per disk basis. This does not count metadisks as disks.
I will also add io transfer for mounted devices, and the ususal diff() function that gives you
the differences since last time you called it.

Revision 1.3 - (view) (annotate) - [select for diffs]
Thu Feb 20 13:19:52 2003 UTC (21 years, 2 months ago) by tdb
Branch: MAIN
Changes since 1.2: +1 -2 lines
Diff to previous 1.2
Removed references to ukcprog.h.
Fixed a missing * in the disk stats.
And removed a block of linux stuff that shouldn't have been there :-)
All with Pete's approval, of course.

Revision 1.2 - (view) (annotate) - [select for diffs]
Thu Feb 20 13:08:45 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
Changes since 1.1: +6 -0 lines
Diff to previous 1.1
Header for new function.

Revision 1.1 - (view) (annotate) - [select for diffs]
Tue Feb 18 19:28:30 2003 UTC (21 years, 2 months ago) by pajs
Branch: MAIN
The new revesion of libstatgrab, which is a complete rewrite essentially.

Firstly the data is now returned in structures rather than xml strings.
The structures returned are all static, so what ever calls the library doesn't
have to deal with the memory management of it.

Secondly the general efficency of the code is now significantly faster. It no
longer needs to fork a process, connect file descriptors and run ps, and then
parse the output like it used to. Now it walks /proc and reads it into the
correct data structures. This works without needing any special privilages, so
it can still run as a normal mortal without needing any special group. (Freebsd
will be an exception to this, but this commit only works with solaris, and that
requires nothing special)

Thridly it has more functionality than it used to. It not for instance is capable
of showing network traffic stats, (although its not completely finished yet). It
also in the near future be able to disk io stats as well. Several bug fixes have
been aplied over the original version. For example the cpu_stats used to only reply
the stats for the first processor. This now will report the total stats of all of
them. Paging stats will also be fixed, but haven't been done yet.

Convenience Links

Links to HEAD: (view) (annotate)

Compare Revisions

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.

  Diffs between and
  Type of Diff should be a