Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross-Platform way to get CPU/Memory utilization [closed]

Looking for a library or a fairly cross platform method to get CPU utilization, memory utilization, etc in C/C++. Something OTHER than getrusage(), I need for entire system, not one process. I've checked around, but haven't found much. I really need it on Linux, Mac Os X, and Windows, but if there's a solution for *nix systems (including OS X) but not Windows, I can work around that.

If all else fails, then ANY methods to do this on ANY of the above platforms would be good to know, and I can figure out how to package them myself!

Thanks

like image 226
Travis Avatar asked Oct 15 '22 15:10

Travis


1 Answers

The cross platform framework ACE has a wrapper for getrusage that should work on most if not all supported platforms.

like image 92
lothar Avatar answered Oct 17 '22 13:10

lothar