This commit is contained in:
2024-02-02 07:55:38 -06:00
parent 55eb9478a7
commit 8add46c2f5
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS='2.5.235-02012024'
VERS='2.5.236-02022024'
noheader=' update service dailytemp confsync -r -report '

View File

@@ -868,7 +868,7 @@ SET_ESXI_FANSPEED(){
SET_FanSpeed=${1}
SET_HOST=${2}
fan=${FanSpeed}
fan="${FanSpeed}%"
if [ ${SET_FanSpeed} -ge ${ESXI_DEF_FANSPEED} ] && [ ${SET_FanSpeed} -le ${PW_ESXI_MAX_FANSPEED} ]; then
ipmitool -I lanplus -H ${PW_HOST_IDRACS[${SET_HOST}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x01 0x00 >/dev/null 2>&1
ipmitool -I lanplus -H ${PW_HOST_IDRACS[${SET_HOST}]} -U ${PW_ESXI_USER} -P "${PW_ESXI_PASS}" raw 0x30 0x30 0x02 0xff 0x$(printf "%X" "${SET_FanSpeed}") >/dev/null 2>&1
@@ -885,7 +885,7 @@ SET_ESXI_FANSPEED(){
[ ! -f ${PW_LOGFOLDER}/esxi-fanspeeds.log ] && touch ${PW_LOGFOLDER}/esxi-fanspeeds.log
[ "${logtemp}" != "" ] && echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SET_FanSpeed}% - ${SET_HOST} - ${MSG}" >> ${logtemp}
[ ${SET_FanSpeed} -ge 70 ] && echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SET_FanSpeed}% - ${SET_HOST} - ${MSG}" >> ${PW_LOGFILE}
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${fan}% - ${SET_HOST} - ${MSG}" >> ${PW_LOGFOLDER}/esxi-fanspeeds.log
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${fan} - ${SET_HOST} - ${MSG}" >> ${PW_LOGFOLDER}/esxi-fanspeeds.log
echo "${SET_FanSpeed}" >| ${PW_TMPFOLDER}/.lastfancheck/${SET_HOST}.set
[ "${SET_HOST}" == "iDS-vMS-Host7" ] && [ ! -f ${PW_TMPFOLDER}/iDS-vMS-Host6.down ] && SET_ESXI_FANSPEED ${SET_FanSpeed} iDS-vMS-Host6 >/dev/null 2>&1 &
[ -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.gl ] && rm -f ${PW_TMPFOLDER}/.lastfancheck/${SENSORa}.gl