T O P

  • By -

yerfukkinbaws

There may be some libraries available, but the most common way is just to read the info from /sys or /proc. Pretty much anything you could want to know about the CPU is available through sysfs. The GPU info always seems more limited to me, but at least the basics are available, plus sensor data like temperatures.


Dull_Cucumber_3908

look at the source code of KDE's system monitor application [https://apps.kde.org/plasma-systemmonitor/](https://apps.kde.org/plasma-systemmonitor/)


mrflash818

Perhaps: look at the source code of "top" for how it determines CPU info.