Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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