Add support for AIX 5.x - 9.x. Many thanks to Jens Rehsack <rehsack@googlemail.com> for providing the patch for this work. Thanks!
Make list of valid filesystem types dynamic on FreeBSD. Based on patch by Baptiste Daroussin.
FreeBSD has zfs these days.
Add zfs to allowed FSs on Solaris.
Make sure we always close kstat. Spotted by: "Javier Donaire" <jyuyu@fraguel.org> (in load_stats.c)
Have nfs be a legal filesystem type on all platforms.
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
Add more fs stats. Patches provided by: Roman Neuhauser
Rework Linux partition detection to detect devices called "c0d0" (etc.) and not assume they're partitions -- the DAC* and Compaq RAID devices do this.
Add NFS to list of file systems that we return information for.
HP-UX disk IO calculation, version 3.
Cast numbers to be the same type when doing a comparison.
Add a FIXME (it'd be preferable to avoid the /dev/dsk search when possible).
Fix IO bytes calculation -- the value returned is in 16-bit words, so divide by two to get bytes.
Rework the HP-UX disk stats code to fetch batches of disks. (Untested.)
Correct comment.
Merge in patch to provide support for HP-UX 11.11. Contributed by Roy Keene - thanks Roy!
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).
Let libstatgrab know about the veritas file system (vxfs).
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.
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.
Fix bugs in error code.
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.
Error reporting for disk_stats.
Whitespace tidyup - change spaces to tabs.
Change malloc -> sg_malloc, realloc -> sg_realloc, and rewrite the one calloc call to use sg_malloc.
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".
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 "".
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.
Use update_string throughout.
I like copy_string. We should use it EVERYWHERE. Also, the name needed changing.
Convert another realloc-managed static array to a vector.
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.
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.)
Silence a (harmless) "may be used uninitialised" error.
People using devfs have partition names longer than 20 characters.
Add support for DragonFly BSD 1.0. Also a minor tweak to the network interface code to make it more portable.
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).
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.
Tidy up get_network_stats_diff and get_diskio_stats_diff.
A whole bunch of minor cosmetic changes.
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.
Add a couple of missing checks for NULL return values; this fixes the crash when libstatgrab runs out of FDs.
Don't close f twice.
Oops, yes. f can't be NULL at that point, though. Fix unterminated comment.
Fixed leaking fd in diskio_stats code. Fixed a potential leak in page_stats.
Turn on the solaris disk mapping code. Fix some minor bugs, and remove some debugging code.
Make libstatgrab functions return NULL for stats that can't be fetched on cygwin.
Factor out duplicated code that checks for valid FS types.
Make Cygwin its own platform, rather than defining LINUX. This stops libstatgrab from trying to fetch stats that Cygwin doesn't have.
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!
Support disk IO statistics on Linux 2.6. Remove a couple of unused variables.
Correct comment about where dk_rbytes is available.
Update VALID_FS_TYPES for FreeBSD (at least, those that I can see from a quick look at src/sys).
Update VALID_FS_TYPES for NetBSD.
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).
Avoid bzero(NULL, ...) on malloc failure.
Update the Linux VALID_FS_TYPES list based on the writable disk-based filesystems in 2.4.22 (plus xfs and jfs).
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.
Fix warning when building on Linux.
Fix a little bit of slightly-confused comment formatting.
Fixed a forgotten line from the patch
Freebsd 5 patch for disk stats. Thanks to Tim Bishop for doing the hard work on this patch.
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.
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.
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.
Bug fix on systems with large path_to_inst files.
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 :)
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()."
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.)
Don't fclose(NULL).
Tidy up of lots of little things. :)
Should now work on freebsd.
Disk stats for freebsd. This does not currently include diskio stats.
Fixed some issues with not closing FILE*'s.
Bug fix, again :) .. I wasn't reporting the time taken since last statgrab correctly. So got very busy disks apparently ;)
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.
Linux reports stupid results. Fixed to return real vaules. Side note, gkrellm is doing it wrong ;)
Working linux diskio stats. Fixed bug in tools.c
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! :)
disk_stats for linux. Does not do diskio stats yet.
Bug fix
Tidy up of configure script, and includes.
Changed function name changed to be consistent.
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.
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.
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.
Header for new function.
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.
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.