update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERS='2.5.234-02012024'
|
||||
VERS='2.5.235-02012024'
|
||||
|
||||
noheader=' update service dailytemp confsync -r -report '
|
||||
|
||||
|
||||
@@ -585,39 +585,30 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
||||
logtemp=${PW_LOGFOLDER}/log-temp-${SENSOR}
|
||||
if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ]; then
|
||||
|
||||
[ -f ${PW_TMPFOLDER}/${SENSOR}.disable ] && rm -f ${PW_TMPFOLDER}/${SENSOR}.disable
|
||||
|
||||
if [ -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
|
||||
SENDNOTICE "${SENSOR} Online" "${SENSOR} Sensor is back online"
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - Sensor is back online" >> ${logtemp}
|
||||
if [ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] || [ -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
|
||||
if [ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ]; then
|
||||
SENDNOTICE "${SENSOR} Data" "${SENSOR} is reporting data again"
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - Sensor is reporting data again" >> ${logtemp}
|
||||
fi
|
||||
if [ "${SENSORa}" == "iDS-vMS-Host6" ] && [[ "${vSENSOR}" = *"Inlet"* ]]; then
|
||||
[ -f ${PW_TMPFOLDER}/.lastfancheck/iDS-vMS-Host7.set ] && nfs=$(cat ${PW_TMPFOLDER}/.lastfancheck/iDS-vMS-Host7.set) || nfs=35
|
||||
SET_ESXI_FANSPEED ${nfs} ${SENSORa} >/dev/null 2>&1 &
|
||||
fi
|
||||
rm -f ${PW_TMPFOLDER}/${SENSOR}*
|
||||
fi
|
||||
if [ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ]; then
|
||||
SENDNOTICE "${SENSOR} Data" "${SENSOR} is reporting data again"
|
||||
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - Sensor is reporting data again" >> ${logtemp}
|
||||
rm -f ${PW_TMPFOLDER}/${SENSOR}*
|
||||
elif [ -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
|
||||
rm -f ${PW_TMPFOLDER}/${SENSOR}*
|
||||
fi
|
||||
|
||||
|
||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "cpu" ]; then
|
||||
GAUGE="CPU-USAGE"
|
||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ] && [[ "${SENSORa}" = *"FAN"* ]]; then
|
||||
GAUGE="RPM"
|
||||
else
|
||||
GAUGE="TEMP"
|
||||
fi
|
||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "cpu" ]; then
|
||||
GAUGESH='%'
|
||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ] && [[ "${SENSORa}" = *"FAN"* ]]; then
|
||||
GAUGE="RPM"
|
||||
GAUGESH="'R"
|
||||
else
|
||||
GAUGE="TEMP"
|
||||
GAUGESH="'F"
|
||||
fi
|
||||
|
||||
#### [ -f ${PW_TMPFOLDER}/${SENSOR}.* ] && rm -f ${PW_TMPFOLDER}/${SENSOR}.*
|
||||
|
||||
|
||||
if [ "${SENSOR}" == "ServerRoomTH" ]; then
|
||||
temp_f=`echo "scale=2; ${temp_c}*1.8+32+${PW_ServerRoomTH_Dev}" | bc`
|
||||
else
|
||||
@@ -688,7 +679,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
||||
elif [ "${FanSpeed}" != "" ]&& [ ${FanSpeed} -ge 90 ] && [ ! -f ${PW_TMPFOLDER}/temp.* ]; then
|
||||
SENDNOTICE "${PW_HOST_IDRACS[${SENSORa}]} FAN ISSUE?!" "Possible fan issue, currently running at ${FanSpeed}%" 1
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${SENSORa}" != *"-Usage"* ]] && [[ "${SENSORa}" != *"FAN"* ]] && (( $(bc <<< "${temp_f} < ${temp_warn}") )); then
|
||||
|
||||
Reference in New Issue
Block a user