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.
from William Yodlowsky (MAINTAINER)
with tweaks by me