diff --git a/powerwall.sh b/powerwall.sh index 77a5d756..cfa557bb 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -267,13 +267,14 @@ CHECKTEMP_SERVICE(){ temp_c=`echo "scale=1; ${temp_c}/10" | bc` temp_warn=$(snmpwalk -v 1 -c public -t 2 ${PW_HOST_IDRACS[${SENSORa}]} .1.3.6.1.4.1.674.10892.5.4.700.20.1.11.1.${t} -O vq | sed -e 's/"//g') temp_warn=`echo "scale=1; ${temp_warn}/10" | bc` + temp_warn=$(echo "scale=2; ${temp_warn}*1.8 + 32" | bc) temp_crit=$(snmpwalk -v 1 -c public -t 2 ${PW_HOST_IDRACS[${SENSORa}]} .1.3.6.1.4.1.674.10892.5.4.700.20.1.10.1.${t} -O vq | sed -e 's/"//g') temp_crit=`echo "scale=1; ${temp_crit}/10" | bc` + temp_crit=$(echo "scale=2; ${temp_crit}*1.8 + 32" | bc) temp_crit_sys=${temp_crit} temp_h='' vSENSOR=${SENSOR} SENSOR="${SENSORa}-${vSENSOR// /_}" - echo "$vSENSOR - $SENSOR - $temp_c - $temp_warn - $temp_crit - $temp_crit_sys" ((t++)) fi @@ -285,8 +286,8 @@ CHECKTEMP_SERVICE(){ rm -f ${PW_TMPFOLDER}/${SENSOR}-error.reading fi - temp_f=`echo "scale=2; ${temp_c}*1.8 + 32" | bc` - # echo "HERE: ${SENSOR} - ${temp_f} - ${temp_warn} - ${temp_crit} - ${temp_crit_sys}" + temp_f=$(echo "scale=2; ${temp_c}*1.8 + 32" | bc) + echo "HERE: ${SENSOR} - ${temp_f} - ${temp_warn} - ${temp_crit} - ${temp_crit_sys}" if [ "${PW_SENSOR_TYPE[${SENSORa}]}" != "esxi" ]; then echo ${PW_TEMP_THRESHOLDS[${SENSOR}]} | cut -d',' -f 1 | read temp_warn