- What is libstatgrab?
- Current version
- Bug reporting and development
- Language bindings
What is libstatgrab?
libstatgrab is a library that provides cross platform access to statistics about the system on which it’s run. It’s written in C and presents a selection of useful interfaces which can be used to access key system statistics. The current list of statistics includes CPU usage, memory utilisation, disk usage, process counts, network traffic, disk I/O, and more.
The current list of supported and tested platforms includes FreeBSD, Linux, NetBSD, OpenBSD, Solaris, DragonFly BSD, HP-UX and AIX. We are always happy to accept patches to extend support to other operating systems.
The package also includes a couple of useful tools. The first, saidar, provides a curses-based interface to viewing the current state of the system. The second, statgrab, gives a sysctl-style interface to the statistics gathered by libstatgrab. This extends the use of libstatgrab to people writing scripts or anything else that can’t easily make C function calls. Included with statgrab is a script to generate an MRTG configuration file to use statgrab.
The library part of libstatgrab is licensed under the GNU LGPL, but the tools and examples are licensed under the GNU GPL.
The current release is libstatgrab 0.91 released on 11 July 2014.
It includes a number of bugfixes and new features but is API compatible with 0.90.
/proc/mountson Linux where available.
- Add a new field named
device_canonicalto the filesystem statistics.
- Fix list miscounting in
- Fix buffer overrun when dealing with a larger number of processes.
- Fix divide by zero display problem in saidar.
- When logging with log4cplus is enabled, properties files are installed in to
- Add Graphite output support in statgrab.
A full list of changes can be found in the NEWS file contained within the release.
pub rsa4096/0xA12F416AA37F3BD7 2013-08-07 [SC] [expires: 2019-04-13] Key fingerprint = 4AD8 6566 CAD0 3297 A980 4702 A12F 416A A37F 3BD7 uid [ultimate] i-scream Development Team <email@example.com> sub rsa4096/0x29E38BE8BCE83B45 2013-08-07 [E] [expires: 2019-04-13]
For installation instructions see the README file contained within the archive.
Bug reporting and development
If you found a bug or an issue with libstatgrab then you can report it on the project’s GitHub issues page. If you have a fix you can make a pull request there too. Bugs with a detailed description or a fix are likely to be committed sooner.
We’re happy to accept patches that fix, improve, or extend libstatgrab.
Here are links to bindings for higher level languages that provide access to libstatgrab. If you’ve written a binding for another language, please get in touch so we can add a link here.
Packages of libstatgrab
These are various pre-packaged versions of libstatgrab that you can get for your favourite operating system. If we’ve missed any out, please let us know.
We’ve noticed that Google throws up some RPMs relating to Mandrake and Suse, but no webpage for them.
The only online documentation we have at the moment is the manual pages converted in to HTML format. First are the manual pages for the command line tools:
We also have an overview page for the library:
Then we have the manual pages for each function:
Here’s what saidar looks like when it’s running: