update
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
VERS='2.5.123-01092024'
|
VERS='2.5.124-01092024'
|
||||||
|
|
||||||
noheader=' update service dailytemp confsync -r -report '
|
noheader=' update service dailytemp confsync -r -report '
|
||||||
|
|
||||||
|
|||||||
@@ -554,11 +554,8 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
####### Fan Issue Workaround #######
|
####### Fan Issue Workaround #######
|
||||||
echo -en "HERE: ${SENSORa} [ ${SENSOR} ] - ${FanSpeed} = "
|
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "esxi" ] && [ ! -f ${PW_TMPFOLDER}/${SENSORa}.down ] && [ "${FanSpeed}" != "" ] && ([ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] || [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.10.2.27" ]); then
|
||||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "esxi" ] && [ ! -f ${PW_TMPFOLDER}/${SENSORa}.down ] && [ "${FanSpeed}" != "" ] && ([ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] || [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.10.2.27" ]) && [[ "${SENSOR}" = *"CPU1"* ]]; then
|
|
||||||
echo -en "yes1 - "
|
|
||||||
if [ ! -f ${PW_TMPFOLDER}/.fancheck.${SENSORa} ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.fancheck.${SENSORa})) -ge 300 ]; then
|
if [ ! -f ${PW_TMPFOLDER}/.fancheck.${SENSORa} ] || [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.fancheck.${SENSORa})) -ge 300 ]; then
|
||||||
echo -en "yes2 - "
|
|
||||||
# if [ ${FanSpeed} -lt 26 ] || [ ${FanSpeed} -gt 34 ]; then
|
# if [ ${FanSpeed} -lt 26 ] || [ ${FanSpeed} -gt 34 ]; then
|
||||||
if [ ${FanSpeed} -ne 30 ]; then
|
if [ ${FanSpeed} -ne 30 ]; then
|
||||||
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} Fan Issue" "Settings fans back to normal 30%"
|
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} Fan Issue" "Settings fans back to normal 30%"
|
||||||
@@ -568,13 +565,8 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${FanSpeed}% - ${SENSOR} - Resetting FanSpeed back to 30%" >> ${PW_LOGFILE}
|
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${FanSpeed}% - ${SENSOR} - Resetting FanSpeed back to 30%" >> ${PW_LOGFILE}
|
||||||
fi
|
fi
|
||||||
touch ${PW_TMPFOLDER}/.fancheck.${SENSORa}
|
touch ${PW_TMPFOLDER}/.fancheck.${SENSORa}
|
||||||
else
|
|
||||||
echo -en "no2 - "
|
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo -en "no1 - "
|
|
||||||
fi
|
fi
|
||||||
echo
|
|
||||||
|
|
||||||
elif [[ "${SENSORa}" != *"-Usage"* ]]; then
|
elif [[ "${SENSORa}" != *"-Usage"* ]]; then
|
||||||
|
|
||||||
@@ -589,7 +581,8 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
|
|
||||||
if [ $(bc -l <<< "${temp_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit}") -eq 1 ]; then
|
if [ $(bc -l <<< "${temp_f} >= ${temp_warn}") -eq 1 ] && [ $(bc -l <<< "${temp_f} < ${temp_crit}") -eq 1 ]; then
|
||||||
|
|
||||||
([ "${SENSOR}" == "ServerRoomTH" ] || [[ "${SENSOR}" = *"ServerRoomLA"* ]]) && touch ${PW_TMPFOLDER}/temp.warn
|
# ([ "${SENSOR}" == "ServerRoomTH" ] || [[ "${SENSOR}" = *"ServerRoomLA"* ]]) && touch ${PW_TMPFOLDER}/temp.warn
|
||||||
|
touch ${PW_TMPFOLDER}/temp.warn.${SENSOR}
|
||||||
if (( $(bc <<< "${temp_diff} >= 1") )); then
|
if (( $(bc <<< "${temp_diff} >= 1") )); then
|
||||||
SENDNOTICE "${SENSOR} ${GAUGE} WARNING" "WARNING ${GAUGE}: ${temp_f}${GAUGESH} - (Difference of ${temp_diff}${GAUGESH})" 1
|
SENDNOTICE "${SENSOR} ${GAUGE} WARNING" "WARNING ${GAUGE}: ${temp_f}${GAUGESH} - (Difference of ${temp_diff}${GAUGESH})" 1
|
||||||
if [ "${last_temp}" != "${temp_f}" ]; then
|
if [ "${last_temp}" != "${temp_f}" ]; then
|
||||||
@@ -625,8 +618,9 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
|
echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ([ "${SENSOR}" == "ServerRoomTH" ] || [[ "${SENSOR}" = *"ServerRoomLA"* ]]) && [ ! -f touch ${PW_TMPFOLDER}/temp.crit ]; then
|
# if ([ "${SENSOR}" == "ServerRoomTH" ] || [[ "${SENSOR}" = *"ServerRoomLA"* ]]) && [ ! -f ${PW_TMPFOLDER}/temp.crit ]; then
|
||||||
touch ${PW_TMPFOLDER}/temp.crit
|
if [ "${SENSOR}" == "ServerRoomTH" ] && [ ! -f ${PW_TMPFOLDER}/temp.crit.${SENSOR} ]; then
|
||||||
|
touch ${PW_TMPFOLDER}/temp.crit.${SENSOR}
|
||||||
SHUTDOWN_MAIN ${SENSOR} &
|
SHUTDOWN_MAIN ${SENSOR} &
|
||||||
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - Shutting down MAIN servers" >> ${logtemp}
|
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - Shutting down MAIN servers" >> ${logtemp}
|
||||||
|
|
||||||
@@ -646,8 +640,9 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
last_temp=${temp_f}
|
last_temp=${temp_f}
|
||||||
echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
|
echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
|
||||||
fi
|
fi
|
||||||
if ([ "${SENSOR}" == "ServerRoomTH" ] || [[ "${SENSOR}" = *"ServerRoomLA"* ]]) && [ ! -f ${PW_TMPFOLDER}/temp.critsys ]; then
|
# if ([ "${SENSOR}" == "ServerRoomTH" ] || [[ "${SENSOR}" = *"ServerRoomLA"* ]]) && [ ! -f ${PW_TMPFOLDER}/temp.critsys ]; then
|
||||||
touch ${PW_TMPFOLDER}/temp.critsys
|
if [ "${SENSOR}" == "ServerRoomTH" ] && [ ! -f ${PW_TMPFOLDER}/temp.critsys.${SENSOR} ]; then
|
||||||
|
touch ${PW_TMPFOLDER}/temp.critsys.${SENSOR}
|
||||||
SHUTDOWN_SYS ${SENSOR} TEMP &
|
SHUTDOWN_SYS ${SENSOR} TEMP &
|
||||||
SHUTDOWN_CRIT ${SENSOR} &
|
SHUTDOWN_CRIT ${SENSOR} &
|
||||||
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - Sending system shutdown signals, if applicable. Check main Powerwall Logs" >> ${logtemp}
|
echo -e "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - Sending system shutdown signals, if applicable. Check main Powerwall Logs" >> ${logtemp}
|
||||||
|
|||||||
Reference in New Issue
Block a user