This commit is contained in:
2024-02-02 14:29:22 -06:00
parent fc751774c8
commit 7de9e3cb1f
2 changed files with 3 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS='2.5.240-02022024'
VERS='2.5.241-02022024'
noheader=' update service dailytemp confsync -r -report '

View File

@@ -632,6 +632,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.gl ] && [ -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set)) -ge 3600 ]; then
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} FAN CONTROL" "Goldilock Zone Found at ${FanSpeed}%"
echo "${FanSpeed}" >| ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.gl
[ "${SENSORa}" == "iDS-vMS-Host7" ] && echo "${FanSpeed}" >| ${PW_TMPFOLDER}/.lastfancheck/iDS-vMS-Host6.gl
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${FanSpeed}% - ${SENSORa} - Goldilock Zone Found (1HR)" >> ${logtemp}
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${FanSpeed}% - ${SENSORa} - Goldilock Zone Found (1HR)" >> ${PW_LOGFOLDER}/esxi-fanspeeds.log
@@ -669,7 +670,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} FanSpeed Control" "Resetting Fans back to being Host Controlled"
rm -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}*
ipmitool -I lanplus -H ${PW_HOST_IDRACS[${SENSORa}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x01 0x01 >/dev/null 2>&1
[ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.10.2.27" ] && ipmitool -I lanplus -H 10.10.2.26 -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x01 0x01 >/dev/null 2>&1
[ "${SENSORa}" == "iDS-vMS-Host7" ] && ipmitool -I lanplus -H 10.10.2.26 -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x01 0x01 >/dev/null 2>&1
elif [ "${FanSpeed}" != "" ]&& [ ${FanSpeed} -ge 90 ] && [ ! -f ${PW_TMPFOLDER}/temp.* ]; then
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} FAN ISSUE?!" "Possible fan issue, currently running at ${FanSpeed}%" 1