Update temp.inc.sh

This commit is contained in:
2023-12-30 12:31:31 -06:00
parent f750c0a8d4
commit 08530822f0

View File

@@ -311,7 +311,6 @@ CHECKTEMP_SERVICE(){
}
CHECKTEMP_SERVICE_RUNSENSOR(){
SENSORa=${1}
echo ${1}
logtemp=${PW_LOGFOLDER}/log-temp-${SENSORa}
[ ! -f ${logtemp} ] && touch ${logtemp}
[ $(expr `date +%s` - $(stat -c %Y ${logtemp})) -ge $(echo "scale=0; ${PW_LOG_INTERVAL_NORMAL}*60" | bc) ] && relog=1 || relog=0
@@ -325,6 +324,8 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
fi
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "esxi" ]; then
vHOST_TEMPNAMES=$(snmpwalk -v 1 -c public -t 2 ${PW_HOST_IDRACS[${SENSORa}]} .1.3.6.1.4.1.674.10892.5.4.700.20.1.8 -O vq | sed -e 's/"//g' | sed -e 's/ Temp//g')
echo ${1}
IFS=$'\n'
read -rd '' -a SENSORS_CHECK <<<"${vHOST_TEMPNAMES}"
unset IFS