This commit is contained in:
2024-01-24 21:34:33 -06:00
parent 323b3cf2ca
commit ec0e05a288
2 changed files with 7 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
VERS='2.5.155-01242024'
VERS='2.5.156-01242024'
noheader=' update service dailytemp confsync -r -report '

View File

@@ -318,11 +318,11 @@ CHECKTEMP_SERVICE(){
SCAN_THREADS=4
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - 'Check Temp' Service Startup" >> ${PW_LOGFILE}
SENDTEMPS "TEMP Service Startup" &
[ ! -d ${PW_TMPFOLDER}/.lastfancheck ] && mkdir ${PW_TMPFOLDER}/.lastfancheck
[ ! -d ${PW_TMPFOLDER}/.lastinsert ] && mkdir ${PW_TMPFOLDER}/.lastinsert
[ -d ${PW_TMPFOLDER}/.lasttemp ] && rm -Rf ${PW_TMPFOLDER}/.lasttemp
mkdir ${PW_TMPFOLDER}/.lasttemp
rm -f ${PW_TMPFOLDER}/ztemprun.*
rm -f ${PW_TMPFOLDER}/.fancheck.*
while true; do
start=$(date +%s)
@@ -392,7 +392,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
t=1
####### Fan Issue Workaround #######
if [ ! -f ${PW_TMPFOLDER}/${SENSORa}.down ] && ([ ! -f ${PW_TMPFOLDER}/.fancheck.${SENSORa} ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.fancheck.${SENSORa})) -ge 300 ]); then
if [ ! -f ${PW_TMPFOLDER}/${SENSORa}.down ] && ([ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa} ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${SENSORa})) -ge 300 ]); then
# vHOSTFAN=$(snmpwalk -v 1 -c public -t 2 ${PW_HOST_IDRACS[${SENSORa}]} .1.3.6.1.4.1.674.10892.5.4.700.12.1.6.1.3 -O vq)
vHOSTFAN=$(ssh -q -o ConnectTimeout=1 -o ConnectionAttempts=1 root@${PW_RACADM_ACCESS} racadm -r ${PW_HOST_IDRACS[${SENSORa}]} -u ${PW_ESXI_USER} -p "'${PW_ESXI_PASS}'" getsensorinfo | grep "System Board Fan3" 2>&1)
if [ "${vHOSTFAN}" != "" ]; then
@@ -563,7 +563,7 @@ Previous Temp: ${last_temp}${GAUGESH}"
####### Fan Issue Workaround #######
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "esxi" ] && [ ! -f ${PW_TMPFOLDER}/${SENSORa}.down ] && [ "${FanSpeed}" != "" ]; then
if [ ! -f ${PW_TMPFOLDER}/.fancheck.${SENSORa} ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.fancheck.${SENSORa})) -ge 300 ]; then
if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa} ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${SENSORa})) -ge 300 ]; then
if [ ${FanSpeed} -ne 30 ]; then
if [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] || [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.10.2.27" ] || [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.10.2.26" ] || [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.10.2.20" ]; then
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} Fan Issue" "Settings fans back to normal 30%"
@@ -575,7 +575,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}/.fancheck.${SENSORa}
echo ${FanSpeed} >| ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}
fi
fi
@@ -606,7 +606,7 @@ Previous Temp: ${last_temp}${GAUGESH}"
####### Fan Issue Workaround #######
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "esxi" ] && [ ! -f ${PW_TMPFOLDER}/${SENSORa}.down ] && [ "${FanSpeed}" != "" ]]; then
if [ ! -f ${PW_TMPFOLDER}/.fancheck.${SENSORa} ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.fancheck.${SENSORa})) -ge 300 ]; then
if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa} ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${SENSORa})) -ge 300 ]; then
# if [ ${FanSpeed} -lt 26 ] || [ ${FanSpeed} -gt 34 ]; then
if [ ${FanSpeed} -ne 80 ]; then
if [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] || [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.10.2.27" ] || [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.10.2.26" ] || [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.10.2.20" ]; then
@@ -619,7 +619,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}/.fancheck.${SENSORa}
echo ${FanSpeed} >| ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}
fi
fi