update
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
VERS='2.5.124-01092024'
|
VERS='2.5.125-01092024'
|
||||||
|
|
||||||
noheader=' update service dailytemp confsync -r -report '
|
noheader=' update service dailytemp confsync -r -report '
|
||||||
|
|
||||||
|
|||||||
@@ -383,23 +383,20 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
t=1
|
t=1
|
||||||
|
|
||||||
####### Fan Issue Workaround #######
|
####### Fan Issue Workaround #######
|
||||||
if [ ! -f ${PW_TMPFOLDER}/${SENSORa}.down ] && ([ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] || [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.10.2.27" ]); then
|
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}/.fancheck.${SENSORa} ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.fancheck.${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=$(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)
|
||||||
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
|
||||||
if [ "${vHOSTFAN}" != "" ]; then
|
# FanSpeed=`echo "scale=2; ${vHOSTFAN}/21200" | bc`; FanSpeed=$(ROUND_NUMBER `echo "scale=0; ${FanSpeed}*100" | bc | sed -e 's/.00//g'` 0)
|
||||||
# FanSpeed=`echo "scale=2; ${vHOSTFAN}/21200" | bc`; FanSpeed=$(ROUND_NUMBER `echo "scale=0; ${FanSpeed}*100" | bc | sed -e 's/.00//g'` 0)
|
if [ "$(echo ${vHOSTFAN} | awk '/ / {print $4}' | sed -e 's/%//g')" == "RPM" ]; then
|
||||||
if [ "$(echo ${vHOSTFAN} | awk '/ / {print $4}' | sed -e 's/%//g')" == "RPM" ]; then
|
FanSpeed=$(echo ${vHOSTFAN} | awk '/ / {print $9}' | sed -e 's/%//g')
|
||||||
FanSpeed=$(echo ${vHOSTFAN} | awk '/ / {print $9}' | sed -e 's/%//g')
|
|
||||||
else
|
|
||||||
FanSpeed=$(echo ${vHOSTFAN} | awk '/ / {print $8}' | sed -e 's/%//g')
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
FanSpeed=''
|
FanSpeed=$(echo ${vHOSTFAN} | awk '/ / {print $8}' | sed -e 's/%//g')
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
FanSpeed=''
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
SENSORS_CHECK=(${SENSORa})
|
SENSORS_CHECK=(${SENSORa})
|
||||||
fi
|
fi
|
||||||
@@ -554,16 +551,19 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
####### Fan Issue Workaround #######
|
####### Fan Issue Workaround #######
|
||||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "esxi" ] && [ ! -f ${PW_TMPFOLDER}/${SENSORa}.down ] && [ "${FanSpeed}" != "" ] && ([ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] || [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.10.2.27" ]); then
|
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}/.fancheck.${SENSORa} ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.fancheck.${SENSORa})) -ge 300 ]; then
|
||||||
# if [ ${FanSpeed} -lt 26 ] || [ ${FanSpeed} -gt 34 ]; then
|
# if [ ${FanSpeed} -lt 26 ] || [ ${FanSpeed} -gt 34 ]; then
|
||||||
if [ ${FanSpeed} -ne 30 ]; then
|
if [ ${FanSpeed} -ne 30 ]; then
|
||||||
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} Fan Issue" "Settings fans back to normal 30%"
|
if [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] || [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.10.2.27" ]; then
|
||||||
ipmitool -I lanplus -H ${PW_HOST_IDRACS[${SENSORa}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x01 0x00 >/dev/null 2>&1
|
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} Fan Issue" "Settings fans back to normal 30%"
|
||||||
ipmitool -I lanplus -H ${PW_HOST_IDRACS[${SENSORa}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x02 0xff 0x1E >/dev/null 2>&1
|
ipmitool -I lanplus -H ${PW_HOST_IDRACS[${SENSORa}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x01 0x00 >/dev/null 2>&1
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${FanSpeed}% - ${SENSOR} - Resetting FanSpeed back to 30%" >> ${logtemp}
|
ipmitool -I lanplus -H ${PW_HOST_IDRACS[${SENSORa}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x02 0xff 0x1E >/dev/null 2>&1
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${FanSpeed}% - ${SENSOR} - Resetting FanSpeed back to 30%" >> ${PW_LOGFILE}
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${FanSpeed}% - ${SENSOR} - Resetting FanSpeed back to 30%" >> ${logtemp}
|
||||||
fi
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${FanSpeed}% - ${SENSOR} - Resetting FanSpeed back to 30%" >> ${PW_LOGFILE}
|
||||||
|
elif [ ${FanSpeed} -ge 90 ]; then
|
||||||
|
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} FAN ISSUE?!" "Possible fan issue, currently running at ${FanSpeed}%" 1
|
||||||
|
fi
|
||||||
touch ${PW_TMPFOLDER}/.fancheck.${SENSORa}
|
touch ${PW_TMPFOLDER}/.fancheck.${SENSORa}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -594,15 +594,19 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
####### Fan Issue Workaround #######
|
####### Fan Issue Workaround #######
|
||||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "esxi" ] && [ ! -f ${PW_TMPFOLDER}/${SENSORa}.down ] && [ "${FanSpeed}" != "" ] && ([ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] || [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.10.2.27" ]) && [[ "${SENSOR}" = *"CPU1"* ]]; then
|
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}/.fancheck.${SENSORa} ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.fancheck.${SENSORa})) -ge 300 ]; then
|
||||||
# if [ ${FanSpeed} -lt 26 ] || [ ${FanSpeed} -gt 34 ]; then
|
# if [ ${FanSpeed} -lt 26 ] || [ ${FanSpeed} -gt 34 ]; then
|
||||||
if [ ${FanSpeed} -ne 80 ]; then
|
if [ ${FanSpeed} -ne 80 ]; then
|
||||||
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} SERVER WARM" "Setting fan speeds to 80%" 1
|
if [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] || [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.10.2.27" ]; then
|
||||||
ipmitool -I lanplus -H ${PW_HOST_IDRACS[${SENSORa}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x01 0x00 >/dev/null 2>&1
|
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} SERVER WARM" "Setting fan speeds to 80%" 1
|
||||||
ipmitool -I lanplus -H ${PW_HOST_IDRACS[${SENSORa}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x02 0xff 0x50 >/dev/null 2>&1
|
ipmitool -I lanplus -H ${PW_HOST_IDRACS[${SENSORa}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x01 0x00 >/dev/null 2>&1
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - ${SENSOR} - Server Warm, setting FanSpeed to 80%" >> ${logtemp}
|
ipmitool -I lanplus -H ${PW_HOST_IDRACS[${SENSORa}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x02 0xff 0x50 >/dev/null 2>&1
|
||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - ${SENSOR} - Server Warm, setting FanSpeed to 80%" >> ${PW_LOGFILE}
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - ${SENSOR} - Server Warm, setting FanSpeed to 80%" >> ${logtemp}
|
||||||
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - ${SENSOR} - Server Warm, setting FanSpeed to 80%" >> ${PW_LOGFILE}
|
||||||
|
else
|
||||||
|
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} SERVER WARM" "Fans not set at 80%" 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
touch ${PW_TMPFOLDER}/.fancheck.${SENSORa}
|
touch ${PW_TMPFOLDER}/.fancheck.${SENSORa}
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user