update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
VERS='2.6.52-02262024'
|
VERS='2.6.54-03012024'
|
||||||
|
|
||||||
noheader=' update service dailytemp confsync -r -report '
|
noheader=' update service dailytemp confsync -r -report '
|
||||||
|
|
||||||
|
|||||||
@@ -183,7 +183,12 @@ CHECKTEMP(){
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${temp_h}" != "" ] && [ "${temp_h}" != "0" ]; then
|
if [ "${temp_h}" != "" ] && [ "${temp_h}" != "0" ]; then
|
||||||
echo -e " ${idsCL[White]}|-- ${idsCL[Default]}Humidity ${idsCL[LightCyan]}$(ROUND_NUMBER ${temp_h} 2)%${idsCL[Default]}"
|
echo -en " ${idsCL[White]}|-- ${idsCL[Default]}Humidity ${idsCL[LightCyan]}$(ROUND_NUMBER ${temp_h} 2)%"
|
||||||
|
if [ "${avgdays}" != "noavg" ]; then
|
||||||
|
echo -en " / ${idsCL[Yellow]}Calculating ${avgdays_disp} average ... "
|
||||||
|
average=$(AVERAGETEMP ${SENSOR} ${avgdays} hum)
|
||||||
|
fi
|
||||||
|
echo -e "${idsCL[Default]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@@ -432,7 +437,7 @@ AVERAGETEMP(){
|
|||||||
sensor=${1}
|
sensor=${1}
|
||||||
sensorid=${PW_SENSOR_ID[${sensor}]}
|
sensorid=${PW_SENSOR_ID[${sensor}]}
|
||||||
logsfound=0;
|
logsfound=0;
|
||||||
if [ "${3}" != "" ]; then
|
if [ "${3}" != "" ] && [ "${3}" != "hum" ]; then
|
||||||
entityid=($(${mysql_conn} -e "SELECT id FROM servermonitor.entities WHERE BINARY name='${3}' AND sensorid='${sensorid}'"))
|
entityid=($(${mysql_conn} -e "SELECT id FROM servermonitor.entities WHERE BINARY name='${3}' AND sensorid='${sensorid}'"))
|
||||||
entityid=${entityid[1]}
|
entityid=${entityid[1]}
|
||||||
WHERE="sensorid=${sensorid} AND entity=${entityid}"
|
WHERE="sensorid=${sensorid} AND entity=${entityid}"
|
||||||
@@ -453,6 +458,8 @@ AVERAGETEMP(){
|
|||||||
while IFS=$'\t' read date temp hum speed ;do
|
while IFS=$'\t' read date temp hum speed ;do
|
||||||
if ([ "${3}" == "FanSpeed" ] && [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" = *"${PW_HOST_IDRACS[${sensor}]}"* ]]) || [ "${sensorid}" == "19" ]; then
|
if ([ "${3}" == "FanSpeed" ] && [[ "${PW_ESXI_FANSPEEDCONTROL_HOSTS}" = *"${PW_HOST_IDRACS[${sensor}]}"* ]]) || [ "${sensorid}" == "19" ]; then
|
||||||
val=${speed}
|
val=${speed}
|
||||||
|
elif [ "${3}" == "hum" ]; then
|
||||||
|
val=${hum}
|
||||||
else
|
else
|
||||||
val=${temp}
|
val=${temp}
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user