Created
February 7, 2020 08:39
-
-
Save ledangtuanbk/08ac772066db51dccaed3e3554052920 to your computer and use it in GitHub Desktop.
Warning CPU 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
min=20 | |
max=70 | |
temps=($(sensors |grep 'Core'|awk '{print substr($3 , 2 , 2)}')) | |
for i in "${temps[@]}" | |
do | |
temp=$i | |
if [ $temp -gt $max ] || [ $temp -lt $min ]; | |
then | |
notify-send "Temperature Warning" "CPU $core $temp°C" | |
break; | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sudo apt install lm-sensors -y
sudo sensors-detect
sensors