Update check_pf_cpu_temp

This commit is contained in:
Dallas 2018-05-09 15:50:43 -05:00 committed by GitHub
parent 6b092ed207
commit 7ed1e7e61d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ if [ "$1" = "-w" ] && [ "$2" -gt "0" ] && [ "$3" = "-c" ] && [ "$4" -gt "0" ] ;
warn=$2
crit=$4
CPUTEMP=$(/sbin/sysctl -a | grep "^dev.*0.temperature" | awk '{print $2}' | cut -d'C' -f1)||exit 3
CPUTEMP=$(/sbin/sysctl -a | grep "^dev.*0.temperature" | awk '{print $2}' | cut -d'.' -f1)||exit 3
if [ -z $CPUTEMP ];then
echo "*** CPU temperature not returned. It might not be supported on this system. ***"