Update temp.inc.sh
This commit is contained in:
@@ -593,7 +593,9 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
||||
if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set)) -ge 300 ]; then
|
||||
echo b-${SENSORa}
|
||||
echo "${temp_f} -- scale=2; ${DEFAULT_ESXI_EXHAUST_MIN}+${ESXI_FANSPEED_GL_ZONE}"
|
||||
if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] && (( $(bc <<< '${temp_f} < $(echo "scale=2; ${DEFAULT_ESXI_EXHAUST_MIN}+${ESXI_FANSPEED_GL_ZONE}' | bc)") )); then
|
||||
GL_HIGH=$(echo "scale=2; ${DEFAULT_ESXI_EXHAUST_MIN}+${ESXI_FANSPEED_GL_ZONE}' | bc)")
|
||||
GL_LOW=$(echo "scale=2; ${DEFAULT_ESXI_EXHAUST_MIN}-${ESXI_FANSPEED_GL_ZONE}' | bc)")
|
||||
if [ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.set ] && (( $(bc <<< "${temp_f} < ${GL_HIGH}" )); then
|
||||
echo 1-${SENSORa}
|
||||
if [ ${FanSpeed} -ne ${DEFAULT_ESXI_FANSPEED} ]; then
|
||||
if [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" = *"${PW_HOST_IDRACS[${SENSORa}]}"* ]]; then
|
||||
@@ -607,7 +609,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
||||
([ ! -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa} ] || [ "$(cat ${PW_TMPFOLDER}/.lastfancheck/${SENSORa})" != "${FanSpeed}" ]) && echo "${FanSpeed}" >| ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}
|
||||
[ -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.gl ] && rm -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.gl
|
||||
|
||||
elif (( $(bc <<< "${temp_f} >= $(echo "scale=2; ${DEFAULT_ESXI_EXHAUST_MIN}-${ESXI_FANSPEED_GL_ZONE}" | bc)") )) && (( $(bc <<< "${temp_f} <= $(echo "scale=2; ${DEFAULT_ESXI_EXHAUST_MIN}+${ESXI_FANSPEED_GL_ZONE}" | bc)") )); then
|
||||
elif (( $(bc <<< "${temp_f} >= ${GL_LOW}" )) && (( $(bc <<< "${temp_f} <= ${GL_HIGH}" )); then
|
||||
echo 2-${SENSORa}
|
||||
##GOLDILOCK ZONE
|
||||
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} FAN CONTROL" "Goldilock Zone Found at ${FanSpeed}%"
|
||||
|
||||
Reference in New Issue
Block a user