have a look at libgtop: http://home-of-linux.org/gnome/libgtop/
it is meant to be a cross-platform api for info you'd normally see with top, df, netstat, uptime, etc. the concept is great, but i've only had success on linux and quite a struggle on solaris. i've heard it works fine on freebsd. there is no win32 support. not sure what the status of the project is, it hasn't been updated in quite a while. an apr-based version of the libgtop concept would be a hellava nice library to have.