mirror of
https://github.com/ShaYmez/HBMonv2.git
synced 2025-08-03 13:42:25 -04:00
update info about setup CPU temp
This commit is contained in:
parent
61b6234331
commit
d626f43084
@ -11,23 +11,25 @@ tempcpu=false
|
|||||||
|
|
||||||
# Setup temperature for CPU ============
|
# Setup temperature for CPU ============
|
||||||
|
|
||||||
# For Raspberry PI:
|
# For Raspberry PI set tempcup=true and uncomnet below:
|
||||||
|
#FILE=/sys/class/thermal/thermal_zone0/temp
|
||||||
FILE=/sys/class/thermal/thermal_zone0/temp
|
#if [[ -f "$FILE" ]]; then
|
||||||
if [[ -f "$FILE" ]]; then
|
#tempC=`cat /sys/class/thermal/thermal_zone0/temp |awk '{printf("%.1f",$1)}'`
|
||||||
tempC=`cat /sys/class/thermal/thermal_zone0/temp |awk '{printf("%.1f",$1)}'`
|
#fi
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# For platform not like Raspberry PI install package
|
# For platform not like Raspberry PI install package
|
||||||
# apt install lm-sensors
|
# apt install lm-sensors
|
||||||
# and run: sensors-detect
|
# and run command: sensors-detect
|
||||||
# after this check result run command: sensors to see temperature CPU, if no set above tempcpu=false
|
# to setup sensors and
|
||||||
|
# next check result run command: sensors
|
||||||
|
# to see temperature CPU, if no set: tempcpu=false
|
||||||
|
# if sensors return temperature CPU set: tempcpu=true
|
||||||
|
|
||||||
# Remove when use for Raspberry PI (see above)
|
# For PC where used sensors tools uncomnet below:
|
||||||
if $tempcpu == "True" ; then
|
#if $tempcpu == "True" ; then
|
||||||
tempC=`sensors | grep -i "Core 0" | grep "$1" | sed -re "s/.*:[^+]*?[+]([.0-9]+)[ °]C.*/\1/g"`
|
#tempC=`sensors | grep -i "Core 0" | grep "$1" | sed -re "s/.*:[^+]*?[+]([.0-9]+)[ °]C.*/\1/g"`
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
#=====================================
|
#=====================================
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user