This commit is contained in:
2025-02-06 21:55:37 -06:00
parent dff24f481a
commit b0021eff0b
2 changed files with 12 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS='2.8.20-02062025'
VERS='2.8.21-02062025'
noheader=' update service dailytemp confsync -r -report test '

View File

@@ -1804,8 +1804,18 @@ SERVERROOM_TEMP_DIFFERENCE(){
}
GET_DEFAULT_FANSPEED(){
current=${2}
if [ ${current} -le ${PW_ESXI_MIN_FANSPEED} ]; then
set_current=${PW_ESXI_MIN_FANSPEED}
elif [ ${current} -ge ${PW_ESXI_MAX_FANSPEED} ]; then
set_current=${PW_ESXI_MAX_FANSPEED}
else
tmp_rem=$((current % 5))
[ "${tmp_rem}" -ge 3 ] && rounded_current=$((current + (5 - tmp_rem))) || rounded_current=$((current - tmp_rem))
set_current=${rounded_current}
fi
hfsfs=$(snmpwalk -v 1 -c public -t 2 ${PW_HOST_IDRACS[${1}]} .1.3.6.1.4.1.674.10892.5.2.5 -O vq | sed -e 's/"//g')
([ "${2}" != "" ] && [ ${hfsfs} -ge 1800 ] && [ ${hfsfs} -le 60000 ]) && echo ${2} || echo ${PW_ESXI_DEF_FANSPEED}
([ "${set_current}" != "" ] && [ ${hfsfs} -ge 1800 ] && [ ${hfsfs} -le 60000 ]) && echo ${set_current} || echo ${PW_ESXI_DEF_FANSPEED}
}
GET_TUYA_TEMP(){