Update powerwall.sh
This commit is contained in:
@@ -267,13 +267,14 @@ CHECKTEMP_SERVICE(){
|
|||||||
temp_c=`echo "scale=1; ${temp_c}/10" | bc`
|
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=$(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=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=$(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=1; ${temp_crit}/10" | bc`
|
||||||
|
temp_crit=$(echo "scale=2; ${temp_crit}*1.8 + 32" | bc)
|
||||||
temp_crit_sys=${temp_crit}
|
temp_crit_sys=${temp_crit}
|
||||||
temp_h=''
|
temp_h=''
|
||||||
vSENSOR=${SENSOR}
|
vSENSOR=${SENSOR}
|
||||||
SENSOR="${SENSORa}-${vSENSOR// /_}"
|
SENSOR="${SENSORa}-${vSENSOR// /_}"
|
||||||
echo "$vSENSOR - $SENSOR - $temp_c - $temp_warn - $temp_crit - $temp_crit_sys"
|
|
||||||
((t++))
|
((t++))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -285,8 +286,8 @@ CHECKTEMP_SERVICE(){
|
|||||||
rm -f ${PW_TMPFOLDER}/${SENSOR}-error.reading
|
rm -f ${PW_TMPFOLDER}/${SENSOR}-error.reading
|
||||||
|
|
||||||
fi
|
fi
|
||||||
temp_f=`echo "scale=2; ${temp_c}*1.8 + 32" | bc`
|
temp_f=$(echo "scale=2; ${temp_c}*1.8 + 32" | bc)
|
||||||
# echo "HERE: ${SENSOR} - ${temp_f} - ${temp_warn} - ${temp_crit} - ${temp_crit_sys}"
|
echo "HERE: ${SENSOR} - ${temp_f} - ${temp_warn} - ${temp_crit} - ${temp_crit_sys}"
|
||||||
|
|
||||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" != "esxi" ]; then
|
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" != "esxi" ]; then
|
||||||
echo ${PW_TEMP_THRESHOLDS[${SENSOR}]} | cut -d',' -f 1 | read temp_warn
|
echo ${PW_TEMP_THRESHOLDS[${SENSOR}]} | cut -d',' -f 1 | read temp_warn
|
||||||
|
|||||||
Reference in New Issue
Block a user