Skip to content
Permalink
Browse files

Improved check_sbc_temperature uses nems-info data - PATCH-000005

  • Loading branch information...
NEMS Linux
NEMS Linux committed Mar 30, 2019
1 parent edeae50 commit 77ec2da7ca29437118ceac75a89a93c9197dd33e
Showing with 4 additions and 1 deletion.
  1. +4 −1 data/1.5/nagios/plugins/check_rpi_temperature
@@ -33,7 +33,10 @@ if ! [[ -f /sys/class/thermal/thermal_zone0/temp ]] ; then
echo "UNKNOWN - /sys/class/thermal/thermal_zone0/temp: No such file"
exit 3
fi
TEMP=`awk '{printf "%3.1f", $1/1000}' /sys/class/thermal/thermal_zone0/temp`

#TEMP=`awk '{printf "%3.1f", $1/1000}' /sys/class/thermal/thermal_zone0/temp`
# nems-info does a better job and detects if it is millidegree Celsius (eg., RPi) or just Celsius (eg., PINE64).
TEMP=`/usr/local/bin/nems-info temperature`

if (( $(echo "${TEMP} > ${CRIT}" | bc -l) )); then
echo "TEMPERATURE CRITICAL - CPU Temp: ${TEMP} °C | cpu_temp=${TEMP};${WARN};${CRIT};;"

0 comments on commit 77ec2da

Please sign in to comment.
You can’t perform that action at this time.