How to get current CPU and RAM usage in C++?

后端 未结 9 983
后悔当初
后悔当初 2020-12-01 06:44

is it possible, in C++, to get the current RAM and CPU usage? Is there a platform-indepentent function call?

9条回答
  •  不知归路
    2020-12-01 07:01

    If that is still the case please check:

    http://sourceforge.net/projects/cpp-cpu-monitor/

    It gives you an example how to get CPU and RAM usage of a Linux (tested on Debian and CentOS) and a quite simple instruction of how to install.

    Please feel free to ask if you have any questions regarding this small project.

提交回复
热议问题