Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a cross platform C/C++ library that gives us CPU and memory usage stats? [closed]

I'm looking to find a C/C++ library that gives me system stats like CPU usage and memory usage.

Is there one that works cross platform?

I just don't want to have to re-invent the wheel (badly).

like image 630
batman Avatar asked Oct 21 '22 01:10

batman


1 Answers

You could use SIGAR API (C++)

This is an open source library that does basically what your looking for, but unfortunally there is no platform independent function for this.

If you want one for cross-platforms, ACE has a good one that works for a lot of languages! Note that ACE abstracts the OS in general, and might be heavyweight for what you want. ACE

like image 113
Chantola Avatar answered Oct 22 '22 17:10

Chantola