Update temp.inc.sh
This commit is contained in:
@@ -94,10 +94,10 @@ CHECKTEMP(){
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ "${sensorsqry}" != "" ]; then
|
if [ "${sensorsqry}" != "" ]; then
|
||||||
echo "SQ - ${sensorqry} - ${sq}"
|
echo "SQ - ${sensorsqry} - ${sq}"
|
||||||
declare -A RANGE_TEMPS
|
declare -A RANGE_TEMPS
|
||||||
for R in ${PW_TEMPIND_RANGE[@]}; do
|
for R in ${PW_TEMPIND_RANGE[@]}; do
|
||||||
lookup=($(${mysql_conn} -e "SELECT sensorid,temp FROM servermonitor.sensor_data WHERE sensorid IN (${sensorqry}) AND date >= DATE_SUB(NOW(), INTERVAL ${R} MINUTE) AND date <= DATE_SUB(NOW(), INTERVAL $(expr ${R} - 7) MINUTE) ORDER BY date ASC LIMIT ${sq}"))
|
lookup=($(${mysql_conn} -e "SELECT sensorid,temp FROM servermonitor.sensor_data WHERE sensorid IN (${sensorsqry}) AND date >= DATE_SUB(NOW(), INTERVAL ${R} MINUTE) AND date <= DATE_SUB(NOW(), INTERVAL $(expr ${R} - 7) MINUTE) ORDER BY date ASC LIMIT ${sq}"))
|
||||||
RANGE_TEMPS["${R}-${lookup[2]}"]=${lookup[3]}
|
RANGE_TEMPS["${R}-${lookup[2]}"]=${lookup[3]}
|
||||||
RANGE_TEMPS["${R}-${lookup[4]}"]=${lookup[5]}
|
RANGE_TEMPS["${R}-${lookup[4]}"]=${lookup[5]}
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user