Update temp.inc.sh

This commit is contained in:
2024-01-30 14:57:26 -06:00
parent e4e919d9a3
commit 156b40e0da

View File

@@ -103,7 +103,7 @@ CHECKTEMP(){
else
echo -e "${idsCL[Default]}"
fi
if [ "${temptype}" != "fans" ]; then
# if [ "${temptype}" != "fans" ]; then
DIVIDER . lightCyan 70
echo -en "${idsCL[Yellow]}Pulling data for '${SENSOR}' ... "
@@ -117,6 +117,7 @@ CHECKTEMP(){
if [ ${#vHOST_TEMPNAMES[@]} -gt 1 ]; then
t=1
for sensorname in "${vHOST_TEMPNAMES[@]}"; do
if [ "${temptype}" != "fans" ] || ([ "${temptype}" == "fans" ] && [[ "${sensorname}" = *"Exhaust"* ]]); then
temp_c=$(snmpwalk -v 1 -c public -t 2 ${vHOSTiDRACIP} .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_warn=$(snmpwalk -v 1 -c public -t 2 ${vHOSTiDRACIP} .1.3.6.1.4.1.674.10892.5.4.700.20.1.11.1.${t} -O vq | sed -e 's/"//g')
@@ -132,6 +133,7 @@ CHECKTEMP(){
echo -e "${idsCL[LightCyan]} ${sensorname}${spc}${idsCL[Default]}: ${reading}"
((t++))
fi
done
else
echo -e "${idsCL[LightCyan]} ${vHOSTNAME}${spc}${idsCL[Default]}: No Data"
@@ -146,7 +148,7 @@ CHECKTEMP(){
# touch ${PW_TMPFOLDER}/${EHOST}.down
# fi
fi
fi
# fi
echo
fi