Update temp.inc.sh
This commit is contained in:
@@ -849,7 +849,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
||||
t=1
|
||||
|
||||
####### Grab Fan Speeds #######
|
||||
if [ ! -f ${PW_TMPFOLDER}/${SENSORa}.down ] && ([ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa} ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${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 60 ]); 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=3 -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
|
||||
@@ -1076,7 +1076,11 @@ 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
|
||||
[ "${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
|
||||
if [ "${SENSORa}" == "iDS-vMS-Host7" ]; then
|
||||
SENDNOTICE "10.10.2.26 FanSpeed Control" "Resetting Fans back to being Host Controlled"
|
||||
rm -f ${PW_TMPFOLDER}/.lastfancheck/iDS-vMS-Host6*
|
||||
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
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user