This commit is contained in:
2024-02-01 21:50:14 -06:00
parent ad5cc4fcb6
commit 67bbfbf5ec
2 changed files with 14 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
VERS='2.5.234-02012024' VERS='2.5.235-02012024'
noheader=' update service dailytemp confsync -r -report ' noheader=' update service dailytemp confsync -r -report '

View File

@@ -585,39 +585,30 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
logtemp=${PW_LOGFOLDER}/log-temp-${SENSOR} logtemp=${PW_LOGFOLDER}/log-temp-${SENSOR}
if [ "${temp_c}" != "null" ] && [ "${temp_c}" != "" ]; then 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 if [ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ] || [ -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
SENDNOTICE "${SENSOR} Online" "${SENSOR} Sensor is back online" if [ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ]; then
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - Sensor is back online" >> ${logtemp} SENDNOTICE "${SENSOR} Data" "${SENSOR} is reporting data again"
rm -f ${PW_TMPFOLDER}/${SENSOR}* echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - Sensor is reporting data again" >> ${logtemp}
fi fi
if [ -f ${PW_TMPFOLDER}/${SENSOR}-error.sent ]; then if [ "${SENSORa}" == "iDS-vMS-Host6" ] && [[ "${vSENSOR}" = *"Inlet"* ]]; then
SENDNOTICE "${SENSOR} Data" "${SENSOR} is reporting data again" [ -f ${PW_TMPFOLDER}/.lastfancheck/iDS-vMS-Host7.set ] && nfs=$(cat ${PW_TMPFOLDER}/.lastfancheck/iDS-vMS-Host7.set) || nfs=35
echo "($(date +'%Y-%m-%d %H:%M:%S')) - ${SENSOR} - Sensor is reporting data again" >> ${logtemp} SET_ESXI_FANSPEED ${nfs} ${SENSORa} >/dev/null 2>&1 &
rm -f ${PW_TMPFOLDER}/${SENSOR}* fi
elif [ -f ${PW_TMPFOLDER}/${SENSOR}.down ]; then
rm -f ${PW_TMPFOLDER}/${SENSOR}* rm -f ${PW_TMPFOLDER}/${SENSOR}*
fi fi
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "cpu" ]; then if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "cpu" ]; then
GAUGE="CPU-USAGE" 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='%' GAUGESH='%'
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ] && [[ "${SENSORa}" = *"FAN"* ]]; then elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ] && [[ "${SENSORa}" = *"FAN"* ]]; then
GAUGE="RPM"
GAUGESH="'R" GAUGESH="'R"
else else
GAUGE="TEMP"
GAUGESH="'F" GAUGESH="'F"
fi fi
#### [ -f ${PW_TMPFOLDER}/${SENSOR}.* ] && rm -f ${PW_TMPFOLDER}/${SENSOR}.*
if [ "${SENSOR}" == "ServerRoomTH" ]; then if [ "${SENSOR}" == "ServerRoomTH" ]; then
temp_f=`echo "scale=2; ${temp_c}*1.8+32+${PW_ServerRoomTH_Dev}" | bc` temp_f=`echo "scale=2; ${temp_c}*1.8+32+${PW_ServerRoomTH_Dev}" | bc`
else else