I'm trying to monitor AMD gpus in a system running AMDGPU-PRO 18.10 and linux kernel 4.4.0.
I am reading values from:
/sys/kernel/debug/dri/$X/amdgpu_pm_info
where $X is a card index.
I am also reading the pp_dpm_cclk values from another directory, found under
/sys/class/drm/card$X/
I have 2 questions about this.
Does $X in both these cases refer to the same card? E.g. is /sys/class/drm/card0/device/pp_dpm_mclk
returning information about the same card as /sys/kernel/debug/dri/0/amdgpu_pm_info
?
Will this be true every boot/if I add or remove cards?
Finally, should I be using /sys/devices/pci0000:00
to access pp_dpm_mclk rather than the symlinks in /sys/class/drm
? If so, how can I find out which card in /sys/devices/pci0000:00
corresponds to the cards in /sys/kernel/debug/dri
?
Thanks