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.
Fix a couple of Cygwin build issues. Not all the #ifdef LINUX's were changed in a previous commit.
Make Cygwin its own platform, rather than defining LINUX. This stops libstatgrab from trying to fetch stats that Cygwin doesn't have.
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.
... and the size parameter should be initialised to the size of the buffer first (although FreeBSD doesn't actually seem to care, NetBSD does, and the manual page says so).
You only need to call sysctl{,byname}() twice if you're actually going to do something with the size the first call returns. The last argument to sysctl{,byname}() is a size_t, not a pointer, so it should be 0, not NULL.
Tidy up of lots of little things. :)
Freebsd support. Smile tim ;)
Fixed some issues with not closing FILE*'s.
Added linux support for cpu stats
Removed headers that were not used.
Made cpu stats to a type a bit more cross platform :)
Tidy up of configure script, and includes.
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.
Changed the kstat_close to not return NULL in event of a failure. If we cant close it, well there is nothing i can do about that, so i may as well at least return something useful since its done all the hardwork by that point. And anywan, it should never fail to close :)
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.