update
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
VERS='2.5.97-01012024'
|
||||
VERS='2.5.98-01012024'
|
||||
|
||||
noheader=' update service dailytemp confsync -r -report '
|
||||
|
||||
|
||||
@@ -502,8 +502,10 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
||||
|
||||
([ "${SENSOR}" == "ServerRoomTH" ] || [[ "${SENSOR}" = *"ServerRoomLA"* ]]) && rm -f ${PW_TMPFOLDER}/temp.*
|
||||
rm -f ${PW_TMPFOLDER}/power.${SENSORa}.*
|
||||
last_temp=1
|
||||
echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
|
||||
if [ "${last_temp}" != "1" ]; then
|
||||
last_temp=1
|
||||
echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
|
||||
fi
|
||||
|
||||
# iDS-vMS-Offsite Fan Issue Workaround
|
||||
if [ "${PW_HOST_IDRACS[${SENSORa}]}" == "10.2.1.21" ] && [ "${FanSpeed}" != "" ]; then
|
||||
@@ -520,8 +522,10 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
||||
else
|
||||
|
||||
if ([ ! "${last_temp}" ] || (( $(bc <<< "${last_temp} < 2") ))); then
|
||||
last_temp=${temp_f}
|
||||
echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
|
||||
if [ "${last_temp}" != "${temp_f}" ]; then
|
||||
last_temp=${temp_f}
|
||||
echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
|
||||
fi
|
||||
fi
|
||||
temp_diff=`echo "scale=2; ${last_temp}-${temp_f}" | bc`
|
||||
[ $(bc -l <<< "${temp_diff} < 0") -eq 1 ] && temp_diff=`echo "scale=2; ${temp_diff}*-1" | bc`
|
||||
@@ -531,8 +535,10 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
||||
([ "${SENSOR}" == "ServerRoomTH" ] || [[ "${SENSOR}" = *"ServerRoomLA"* ]]) && touch ${PW_TMPFOLDER}/temp.warn
|
||||
if (( $(bc <<< "${temp_diff} >= 1") )); then
|
||||
SENDNOTICE "${SENSOR} ${GAUGE} WARNING" "WARNING ${GAUGE}: ${temp_f}${GAUGESH} - (Difference of ${temp_diff}${GAUGESH})" 1
|
||||
last_temp=${temp_f}
|
||||
echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
|
||||
if [ "${last_temp}" != "${temp_f}" ]; then
|
||||
last_temp=${temp_f}
|
||||
echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
|
||||
fi
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - WARNING ${GAUGE} - (Difference of ${temp_diff}${GAUGESH})" >> ${logtemp}
|
||||
|
||||
fi
|
||||
@@ -551,8 +557,10 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
||||
SENDNOTICE "${SENSOR} ${GAUGE} CRITICAL" "CRITICAL ${GAUGE}: ${temp_f}${GAUGESH} - (Difference of ${temp_diff}${GAUGESH})" 1
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - CRITICAL - (Difference of ${temp_diff}${GAUGESH})" >> ${logtemp}
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - ${temp_f}${GAUGESH} - CRITICAL ${GAUGE} - (Difference of ${temp_diff}${GAUGESH})" >> ${PW_LOGFILE}
|
||||
last_temp=${temp_f}
|
||||
echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
|
||||
if [ "${last_temp}" != "${temp_f}" ]; then
|
||||
last_temp=${temp_f}
|
||||
echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
|
||||
fi
|
||||
|
||||
if ([ "${SENSOR}" == "ServerRoomTH" ] || [[ "${SENSOR}" = *"ServerRoomLA"* ]]) && [ ! -f touch ${PW_TMPFOLDER}/temp.crit ]; then
|
||||
touch ${PW_TMPFOLDER}/temp.crit
|
||||
@@ -571,8 +579,10 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
||||
SENDNOTICE "${SENSOR} TEMP CRITICAL" "SYSTEM CRITICAL ${GAUGE}: ${temp_f}${GAUGESH} - (Difference of ${temp_diff}${GAUGESH})" 1
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - SYSTEM CRITICAL - (Difference of ${temp_diff})" >> ${logtemp}
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${temp_f}${GAUGESH} - ${SENSOR} - CRITICAL ${GAUGE} SYSTEM - (Difference of ${temp_diff}${GAUGESH})" >> ${PW_LOGFILE}
|
||||
last_temp=${temp_f}
|
||||
echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
|
||||
if [ "${last_temp}" != "${temp_f}" ]; then
|
||||
last_temp=${temp_f}
|
||||
echo ${last_temp} >| ${PW_TMPFOLDER}/.lasttemp/${SENSOR}
|
||||
fi
|
||||
if ([ "${SENSOR}" == "ServerRoomTH" ] || [[ "${SENSOR}" = *"ServerRoomLA"* ]]) && [ ! -f ${PW_TMPFOLDER}/temp.critsys ]; then
|
||||
touch ${PW_TMPFOLDER}/temp.critsys
|
||||
SHUTDOWN_SYS ${SENSOR} TEMP &
|
||||
|
||||
Reference in New Issue
Block a user