Update temp.inc.sh
This commit is contained in:
@@ -869,6 +869,7 @@ CHECKTEMP_SERVICE(){
|
|||||||
until [ $(ls ${PW_TMPFOLDER}/ztemprun.*.running 2>/dev/null | wc -l) -lt ${SCAN_THREADS} ]; do
|
until [ $(ls ${PW_TMPFOLDER}/ztemprun.*.running 2>/dev/null | wc -l) -lt ${SCAN_THREADS} ]; do
|
||||||
tmp=tmp
|
tmp=tmp
|
||||||
done
|
done
|
||||||
|
echo "sensor: ${SENSORa}"
|
||||||
CHECKTEMP_SERVICE_RUNSENSOR ${SENSORa}
|
CHECKTEMP_SERVICE_RUNSENSOR ${SENSORa}
|
||||||
SENSORS_CHECKED+=(${SENSORa})
|
SENSORS_CHECKED+=(${SENSORa})
|
||||||
done
|
done
|
||||||
@@ -877,7 +878,7 @@ CHECKTEMP_SERVICE(){
|
|||||||
for sensor in ${PW_TMPFOLDER}/ztemprun.*.done; do
|
for sensor in ${PW_TMPFOLDER}/ztemprun.*.done; do
|
||||||
tsensor=$(grep -oP '(?<=ztemprun.).*?(?=.done)' <<< "${sensor}")
|
tsensor=$(grep -oP '(?<=ztemprun.).*?(?=.done)' <<< "${sensor}")
|
||||||
if [ "${tsensor}" != "*" ]; then
|
if [ "${tsensor}" != "*" ]; then
|
||||||
echo "sensor: ${tsensor}"
|
# echo "sensor: ${tsensor}"
|
||||||
rm -f ${sensor}
|
rm -f ${sensor}
|
||||||
((s_count++))
|
((s_count++))
|
||||||
if [ -f ${PW_TMPFOLDER}/${tsensor}.down ] && [ -f ${PW_TMPFOLDER}/.lastfancheck/${tsensor}.set ] && [ "${PW_SENSOR_TYPE[${tsensor}]}" == "esxi" ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${tsensor}.set)) -ge 900 ]; then
|
if [ -f ${PW_TMPFOLDER}/${tsensor}.down ] && [ -f ${PW_TMPFOLDER}/.lastfancheck/${tsensor}.set ] && [ "${PW_SENSOR_TYPE[${tsensor}]}" == "esxi" ] && [ $(expr `date +%s` - $(stat -c %Y ${PW_TMPFOLDER}/.lastfancheck/${tsensor}.set)) -ge 900 ]; then
|
||||||
@@ -957,6 +958,7 @@ CHECKTEMP_SERVICE_RUNSENSOR(){
|
|||||||
fi
|
fi
|
||||||
if [ "${SENSORS_CHECK}" != "" ]; then
|
if [ "${SENSORS_CHECK}" != "" ]; then
|
||||||
for SENSOR in "${SENSORS_CHECK[@]}"; do
|
for SENSOR in "${SENSORS_CHECK[@]}"; do
|
||||||
|
echo "HERE-2: ${SENSOR}"
|
||||||
if [ "${PW_THRESHOLDS[${SENSORa}]}" != "" ]; then
|
if [ "${PW_THRESHOLDS[${SENSORa}]}" != "" ]; then
|
||||||
echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 1 | read temp_warn
|
echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 1 | read temp_warn
|
||||||
echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 2 | read temp_crit
|
echo ${PW_THRESHOLDS[${SENSORa}]} | cut -d',' -f 2 | read temp_crit
|
||||||
@@ -1609,7 +1611,7 @@ SENDTEMP(){
|
|||||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" != "esxi" ] && ([ "${PW_SENSOR_TYPE[${SENSORa}]}" == "lacrosse" ] || ([ "${PW_REMOTE_SENSORS[${SENSORa}]}" != "" ] && [ "$(CHECK_HOST ${PW_REMOTE_SENSORS[${SENSORa}]})" != "false" ])); then
|
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" != "esxi" ] && ([ "${PW_SENSOR_TYPE[${SENSORa}]}" == "lacrosse" ] || ([ "${PW_REMOTE_SENSORS[${SENSORa}]}" != "" ] && [ "$(CHECK_HOST ${PW_REMOTE_SENSORS[${SENSORa}]})" != "false" ])); then
|
||||||
SENSORS_CHECK=(${SENSORa})
|
SENSORS_CHECK=(${SENSORa})
|
||||||
for SENSOR in "${SENSORS_CHECK[@]}"; do
|
for SENSOR in "${SENSORS_CHECK[@]}"; do
|
||||||
echo "HERE: ${SENSOR} - ${SENSORa}"
|
# echo "HERE: ${SENSOR} - ${SENSORa}"
|
||||||
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "cpu" ]; then
|
if [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "cpu" ]; then
|
||||||
GAUGESH="'%"
|
GAUGESH="'%"
|
||||||
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]]; then
|
elif [ "${PW_SENSOR_TYPE[${SENSORa}]}" == "system" ] && [[ "${SENSOR}" = *"FAN"* ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user