dots-of-war/files/scripts/gpuinfo.sh
2020-10-30 22:02:38 +02:00

7 lines
300 B
Bash
Executable file

#! /bin/sh
#sudo cat /sys/kernel/debug/dri/0/amdgpu_pm_info
[ "$1" = "--watch" ] && \
sudo watch --no-title -n "0.5" "cat /sys/kernel/debug/dri/0/amdgpu_pm_info | grep -A 10 'GFX Clocks and Power'" || \
sudo cat "/sys/kernel/debug/dri/0/amdgpu_pm_info" \
| sed -n 's/^GPU Load: \(.*\)$/\1/gp'