nokyan / resources

Keep an eye on system resources
GNU General Public License v3.0
830 stars 58 forks source link

Raspberry Pi GPU (Broadcom VideoCore) support is missing, but data is available #408

Open bp0 opened 2 days ago

bp0 commented 2 days ago

Is there an existing issue for this?

There are stats for the Raspberry Pi GPU in /sys/kernel/debug/dri/<n>/gpu_usage, and per-process stats in /sys/kernel/debug/dri/<n>/gpu_pid_usage. It seems like it might be easy to use these as a source for resources. The Raspberry Pi OS version of lxtask uses them, you can examine that code here: https://github.com/raspberrypi-ui/lxtask/blob/40efd5505e20cf48813baa9137c49c6b61e36fd6/src/functions.c#L159

I made this same comment at nvtop: https://github.com/Syllo/nvtop/issues/306

nokyan commented 2 days ago

Hi, thanks for the issue. This sounds like a good feature for Resources 1.8 (or 1.7.1, which ever comes first), I'll look into it. :)