Created
November 28, 2021 14:57
-
-
Save cpietsch/ba591ea8a1b4cc1eb9c13eb1020b211b to your computer and use it in GitHub Desktop.
shutdown linux when amdgpu reaches junction temperature
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/sh | |
maxTemp="+64" | |
while true; do | |
currTemp=$(sensors | awk '/junction/ {print $2}' | cut -d"." -f1) | |
if [[ $currTemp > $maxTemp ]]; then | |
shutdown now | |
echo "too high" | |
fi | |
echo $currTemp | |
sleep 5 | |
clear | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment