Update powerwall.sh
This commit is contained in:
@@ -525,7 +525,7 @@ AVERAGEPOWER(){
|
||||
watttotal=$(bc <<< "scale=2; ${watttotal}+${watt}")
|
||||
((logsfound++))
|
||||
done < <(${mysql_conn} -se "USE servermonitor; SELECT date,watt from power_data WHERE sensorid=${sensorid} AND date BETWEEN DATE_SUB(DATE(NOW()), INTERVAL ${daysback} DAY) AND NOW() ORDER BY id DESC;")
|
||||
average=$(bc <<< "scale=2; ${temptotal}/${logsfound}")
|
||||
average=$(bc <<< "scale=2; ${watttotal}/${logsfound}")
|
||||
echo "$watttotal-$logsfound=${average}"
|
||||
# echo ${average}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user