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