hishamhm / htop

htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.
GNU General Public License v2.0
5.84k stars 581 forks source link

C/C++ APIs? #965

Open pkbehera opened 4 years ago

pkbehera commented 4 years ago

Is there any way to use the APIs in this library in another C/C++ program? I am particularly interested to get the CPU/memory usage info (percentages) by pid or the current program.

Any code example will help.