Update temp.inc.sh

This commit is contained in:
2023-12-26 20:38:34 -06:00
parent b7aa4cb4d4
commit 9abc8ea954

View File

@@ -413,7 +413,6 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
fi
[ "${last_temp[${SENSOR//-/}]}" == "" ] && last_temp[${SENSOR//-/}]=0
[ "${SENSORa}" == "Powerwall-CPU-Usage" ] && echo 1
logtemp=${PW_LOGFOLDER}/log-temp-${SENSOR}
if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ]; then
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "cpu" ]; then
@@ -494,7 +493,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
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
@@ -520,7 +519,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
@@ -536,7 +535,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} &
@@ -601,7 +600,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
# fi
touch ${PW_TMPFOLDER}/${SENSOR}.insert
fi
[ "${SENSORa}" == "Powerwall-CPU-Usage" ] && echo 4
#### LOGGING OF SERVERROOM SENSOR DIFFERENCE
if [ "${SENSOR}" == "ServerRoomLA-Probe" ]; then
# if [ ! -f ${PW_TMPFOLDER}/.log.sr.difference ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.log.sr.difference)) -ge 300 ]; then