Created
May 12, 2021 20:07
-
-
Save kylemanna/6d1cc9078b83039662ea8ae431612740 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#set -ex | |
base=/sys/class/drm/card0/device/hwmon/hwmon? | |
cd $base | |
get_hwmon() { | |
for i in fan1_input pwm1; do | |
echo hwmon: $i: $(cat $i) | |
done | |
for i in temp?_input ; do | |
l=${i%_input}_label | |
echo hwmon: temp $(cat $l): $(cat $i) | |
done | |
} | |
get_dbg() { | |
head -n 15 /sys/kernel/debug/dri/0/amdgpu_pm_info | |
} | |
while true; do | |
get_dbg | |
get_hwmon | sort | |
sleep ${1:-10} | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment