diff --git a/inc/temp.inc.sh b/inc/temp.inc.sh index 074517a0..1c50bd08 100644 --- a/inc/temp.inc.sh +++ b/inc/temp.inc.sh @@ -480,7 +480,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ temp_c=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 root@${PW_REMOTE_SENSORS[${SENSORa}]} "/opt/idssys/defaults/get-data.sh cpu-usage") fi temp_h='' - + fi [ ! -f ${PW_TMPFOLDER}/.lasttemp/${SENSOR} ] && echo 0 > ${PW_TMPFOLDER}/.lasttemp/${SENSOR} @@ -542,6 +542,13 @@ CHECKTEMP_SERVICE_RUNSENSOR(){ echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 1 | read temp_warn echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 2 | read temp_crit echo ${PW_THRESHOLDS[${SENSOR}]} | cut -d',' -f 3 | read temp_crit_sys + + if [[ "${vSENSOR}" = *"Exhaust"* ]]; then + if (( $(bc <<< "${temp_f} >= 100") )); then + + fi + fi + fi if [[ "${SENSORa}" != *"-Usage"* ]] && [[ "${SENSORa}" != *"FAN"* ]] && (( $(bc <<< "${temp_f} < ${temp_warn}") )); then @@ -585,7 +592,7 @@ Previous Temp: ${last_temp}${GAUGESH}" SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} FAN ISSUE?!" "Possible fan issue, currently running at ${FanSpeed}%" 1 fi fi - echo ${FanSpeed} >| ${PW_TMPFOLDER}/.lastfancheck/${SENSORa} + ([ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa} ] || [ "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSORa})" != "${FanSpeed}" ]) && echo "${FanSpeed}" >| ${PW_TMPFOLDER}/.lastfancheck/${SENSORa} fi fi @@ -629,7 +636,7 @@ Previous Temp: ${last_temp}${GAUGESH}" SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} SERVER WARM" "Fans not set at 80%" 1 fi fi - echo ${FanSpeed} >| ${PW_TMPFOLDER}/.lastfancheck/${SENSORa} + ([ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa} ] || [ "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSORa})" != "${FanSpeed}" ]) && echo "${FanSpeed}" >| ${PW_TMPFOLDER}/.lastfancheck/${SENSORa} fi fi