Update temp.inc.sh
This commit is contained in:
@@ -699,17 +699,14 @@ CHECKTEMPSENSOR(){
|
|||||||
|
|
||||||
elif [ "${PW_SENSOR_TYPE[${1}]}" == "system" ]; then
|
elif [ "${PW_SENSOR_TYPE[${1}]}" == "system" ]; then
|
||||||
if [[ "${1}" = *"CPU"* ]]; then
|
if [[ "${1}" = *"CPU"* ]]; then
|
||||||
temp_c=$(vcgencmd measure_temp)
|
if ! temp_c=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${1}]} vcgencmd measure_temp) ; then TIMEOUT=1; fi
|
||||||
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
if [ "${temp_c}" != "" ]; then
|
||||||
|
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
||||||
|
fi
|
||||||
elif [[ "${1}" = *"FAN"* ]]; then
|
elif [[ "${1}" = *"FAN"* ]]; then
|
||||||
temp_c=$(cat ${PW_FANINPUT})
|
if ! temp_c=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${1}]} cat ${PW_FANINPUT}) ; then TIMEOUT=1; fi
|
||||||
fi
|
fi
|
||||||
elif [ "${PW_SENSOR_TYPE[${1}]}" == "remotesystem" ]; then
|
|
||||||
if ! temp_c=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${1}]} vcgencmd measure_temp) ; then TIMEOUT=1; fi
|
|
||||||
if [ "${temp_c}" != "" ]; then
|
|
||||||
temp_c=${temp_c%\'*}; temp_c=${temp_c#*=}
|
|
||||||
|
|
||||||
fi
|
|
||||||
elif [ "${PW_SENSOR_TYPE[${1}]}" == "esxi" ]; then
|
elif [ "${PW_SENSOR_TYPE[${1}]}" == "esxi" ]; then
|
||||||
temp_c=$(snmpwalk -v 1 -c public -t 2 ${PW_HOST_IDRACS[${1}]} .1.3.6.1.4.1.674.10892.5.4.700.20.1.6.1.${t} -O vq | sed -e 's/"//g')
|
temp_c=$(snmpwalk -v 1 -c public -t 2 ${PW_HOST_IDRACS[${1}]} .1.3.6.1.4.1.674.10892.5.4.700.20.1.6.1.${t} -O vq | sed -e 's/"//g')
|
||||||
temp_c=`echo "scale=1; ${temp_c}/10" | bc`
|
temp_c=`echo "scale=1; ${temp_c}/10" | bc`
|
||||||
|
|||||||
Reference in New Issue
Block a user