From 6a3194e99a41ef25853ac4bbcea587709b211458 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Tue, 26 Dec 2023 20:40:00 -0600 Subject: [PATCH] Update temp.inc.sh --- inc/temp.inc.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 4b7a0aba..7d204a98 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -490,10 +490,12 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - Normal ${GAUGE}" >> ${logtemp} fi + [ "${SENSORa}" == "Powerwall-CPU-Usage" ] && echo 2a + rm -f ${PW_TMPFOLDER}/temp.* rm -f ${PW_TMPFOLDER}/power.${SENSORa}.* last_temp[${SENSOR//-/}]=1 - [ "${SENSORa}" == "Powerwall-CPU-Usage" ] && echo 2a + # iDS-vMS-Offsite Fan Issue Workaround if [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] && [ "${FanSpeed}" != "" ]; then if [ ${FanSpeed} -lt 26 ] || [ ${FanSpeed} -gt 34 ]; then @@ -507,6 +509,8 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ fi else + [ "${SENSORa}" == "Powerwall-CPU-Usage" ] && echo 2b + ([ ! "${last_temp[${SENSOR//-/}]}" ] || (( $(bc <<< "${last_temp[${SENSOR//-/}]} < 2") ))) && last_temp[${SENSOR//-/}]=${temp_f} temp_diff=`echo "scale=2; ${last_temp[${SENSOR//-/}]}-${temp_f}" | bc` [ $(bc -l <<< "${temp_diff} < 0") -eq 1 ] && temp_diff=`echo "scale=2; ${temp_diff}*-1" | bc` @@ -519,7 +523,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - WARNING ${GAUGE} - (Difference of ${temp_diff}')" >> ${logtemp} fi - [ "${SENSORa}" == "Powerwall-CPU-Usage" ] && echo 2b + # iDS-vMS-Offsite Fan Issue Workaround if [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] && [ ${FanSpeed} -ne 80 ]; then SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} SERVER WARM" "Setting fan speeds to 80%25" 1 @@ -535,7 +539,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - CRITICAL - (Difference of ${temp_diff}${GAUGESH})" >> ${logtemp} echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - ${temp_f}${GAUGESH} - CRITICAL ${GAUGE} - (Difference of ${temp_diff}')" >> ${PW_LOGFILE} last_temp[${SENSOR//-/}]=${temp_f} - [ "${SENSORa}" == "Powerwall-CPU-Usage" ] && echo 2c + if [ "${SENSOR}" == "ServerRoomTH" ] && [ ! -f touch ${PW_TMPFOLDER}/temp.crit ]; then touch ${PW_TMPFOLDER}/temp.crit SHUTDOWN_MAIN ${SENSOR} &