This commit is contained in:
2023-11-01 22:04:12 -05:00
parent be669a135f
commit 0c7bc88283
2 changed files with 11 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
VERS='2.3.100-11012023' VERS='2.3.105-11012023'
noheader=' update service dailytemp ' noheader=' update service dailytemp '

View File

@@ -43,8 +43,8 @@ CHECKTEMP(){
FanSpeed=$(echo ${vHOSTFAN} | awk '/ / {print $8}' | sed -e 's/%//g') FanSpeed=$(echo ${vHOSTFAN} | awk '/ / {print $8}' | sed -e 's/%//g')
if [ ${FanSpeed} -gt 90 ]; then if [ ${FanSpeed} -gt 90 ]; then
SENDNOTICE "${vHOSTiDRACIP} Fan Issue" "Workaround commands sent to set the Fans at 30%" 1 SENDNOTICE "${vHOSTiDRACIP} Fan Issue" "Workaround commands sent to set the Fans at 30%" 1
ssh root@${PW_RACADM_ACCESS} "ipmitool -I lanplus -H ${vHOSTiDRACIP} -U ${PW_ESXI_USER} -P '${PW_ESXI_PASS}' raw 0x30 0x30 0x01 0x00" ipmitool -I lanplus -H ${vHOSTiDRACIP} -U ${PW_ESXI_USER} -P "'${PW_ESXI_PASS}'" raw 0x30 0x30 0x01 0x00
ssh root@${PW_RACADM_ACCESS} "ipmitool -I lanplus -H ${vHOSTiDRACIP} -U ${PW_ESXI_USER} -P '${PW_ESXI_PASS}' raw 0x30 0x30 0x02 0xff 0x1E" ipmitool -I lanplus -H ${vHOSTiDRACIP} -U ${PW_ESXI_USER} -P "'${PW_ESXI_PASS}'" raw 0x30 0x30 0x02 0xff 0x1E
fi fi
fi fi
@@ -227,8 +227,8 @@ CHECKTEMP_SERVICE(){
FanSpeed=$(echo ${vHOSTFAN} | awk '/ / {print $8}' | sed -e 's/%//g') FanSpeed=$(echo ${vHOSTFAN} | awk '/ / {print $8}' | sed -e 's/%//g')
if [ ${FanSpeed} -gt 92 ]; then if [ ${FanSpeed} -gt 92 ]; then
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} Fan Issue" "Workaround commands sent to set the Fans at 30(percent)" 1 SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} Fan Issue" "Workaround commands sent to set the Fans at 30(percent)" 1
ssh root@${PW_RACADM_ACCESS} "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 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
ssh root@${PW_RACADM_ACCESS} "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 0x02 0xff 0x1E >/dev/null 2>&1
FanSpeed=30 FanSpeed=30
fi fi
fi fi
@@ -307,8 +307,8 @@ CHECKTEMP_SERVICE(){
# iDS-vMS-Offsite Fan Issue Workaround # iDS-vMS-Offsite Fan Issue Workaround
if [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] && [ ${FanSpeed} -ne 80 ]; then if [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] && [ ${FanSpeed} -ne 80 ]; then
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} SERVER WARM" "Setting fan speeds to 80(percent)" 1 SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} SERVER WARM" "Setting fan speeds to 80(percent)" 1
ssh root@${PW_RACADM_ACCESS} "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 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
ssh root@${PW_RACADM_ACCESS} "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 0x02 0xff 0x50 >/dev/null 2>&1
fi fi
fi fi
@@ -379,8 +379,8 @@ Previous Temp: ${last_temp[${SENSOR}]}'F"
# iDS-vMS-Offsite Fan Issue Workaround # iDS-vMS-Offsite Fan Issue Workaround
if [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] && [ ${FanSpeed} -ne 30 ]; then if [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] && [ ${FanSpeed} -ne 30 ]; then
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} Fan Issue" "Settings fans back to normal 30(percent)" SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} Fan Issue" "Settings fans back to normal 30(percent)"
ssh root@${PW_RACADM_ACCESS} "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 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
ssh root@${PW_RACADM_ACCESS} "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 0x02 0xff 0x1E >/dev/null 2>&1
fi fi
fi fi
@@ -664,7 +664,7 @@ CHECKPOWER(){
[[ "${watts}" == *"."* ]] && [[ "${watts}" != *".0"* ]] && watts=`printf "%'.1f\n" ${watts}` || watts=`printf "%'.0f\n" ${watts}` [[ "${watts}" == *"."* ]] && [[ "${watts}" != *".0"* ]] && watts=`printf "%'.1f\n" ${watts}` || watts=`printf "%'.0f\n" ${watts}`
hostpower="${idsCL[Green]}${watts}'W" hostpower="${idsCL[Green]}${watts}'W"
fi fi
echo -e "${idsCL[LightCyan]}HOST '${PW_iDRACHOST_SHORTNAMES[${host}]}' ${idsCL[Default]}: ${hostpower}${idsCL[Default]}" echo -e "${idsCL[LightCyan]}${PW_iDRACHOST_SHORTNAMES[${host}]} ${idsCL[Default]}: ${hostpower}${idsCL[Default]}"
mv ${hostfile} ${hostfile}.done mv ${hostfile} ${hostfile}.done
elif [ "${host}" == "done" ]; then elif [ "${host}" == "done" ]; then
@@ -1245,7 +1245,7 @@ HOSTPOWER(){
echo echo
if [ "${2,,}" == "on" ] || [ "${2,,}" == "off" ] || [ "${2,,}" == "status" ]; then if [ "${2,,}" == "on" ] || [ "${2,,}" == "off" ] || [ "${2,,}" == "status" ]; then
ssh root@${PW_RACADM_ACCESS} ipmitool -I lanplus -H ${idracip} -U ${PW_ESXI_USER} -P "'${PW_ESXI_PASS}'" chassis power ${2,,} ipmitool -I lanplus -H ${idracip} -U ${PW_ESXI_USER} -P "'${PW_ESXI_PASS}'" chassis power ${2,,}
else else
echo -e "${idsCL[LightRed]}'${2,,}' command is not recognized${idsCL[Default]}" echo -e "${idsCL[LightRed]}'${2,,}' command is not recognized${idsCL[Default]}"
fi fi