Open onkoe opened 2 weeks ago
in general, ARM GPU support is looking difficult. on Raspberry Pi, you can parse vcgencmd
, but even that has limited information.
consider talking with kernel maintainers to implement sysfs
functionality for these drivers?
also, research nouveau
resources. how do other collectors do it?
It is surprisingly difficult to get a reasonable amount of identifying/status information from a GPU, especially across platforms.
First of all, most of the major graphics protocols don't provide this kind of info, except some easy parts, like vendor and model identifiers. Looking past these, Vulkan only provides small bits of info. For example, you can get a little peek into the VRAM count by checking a device's memory heap(s). However, this is fallible, and integrated GPUs seem to include system memory in this count.
As such, we can't really use a graphics API to get this information - we need to check manually for each GPu, for each platform.
Here are descriptions on doing just that...
Linux
NVIDIA
Per driver...
nvidia
: NVML can check for card information. There's a great library for this here,nvml_wrapper
.nouveau
: TODO.AMD
amdgpu
: The new driver, post-2015.mem_info_vram_total
file./sys/class/hwmon/hwmonN/name
and ensure it's a GPU, likely "drm". Make sure its driver isamdgpu
, somehow.hwmon/hwmonN/freq1_input
for the compute clock, and freq2_input for the memory clock.radeon
: Old driver. TODO, but not soon.Others
Spare me
...I will work on these later.