Update power.inc.sh

This commit is contained in:
2024-02-10 23:05:33 -06:00
parent 5f014de11c
commit 43f077138e

View File

@@ -808,7 +808,7 @@ POWERLOGGER_SERVICE(){
AIRCON_VOLT=$(echo "${AIRCON_INFO}" | grep '"20":' | cut -d' ' -f 4 | sed 's/,//g')
AIRCON_VOLT=$(echo "scale=3; ${AIRCON_VOLT}/10" | bc -l)
QRY="INSERT INTO power_data (\`sensorid\`, \`date\`, \`volt\`, \`amp\`, \`watt\`) VALUES ('${PW_POWERSENSOR_ID['ServerRoom-AC']}','${LogDataTime}','${SVRRM_VOLT}','${NETRK_AMP}','${NETRK_WATT}')"
QRY="INSERT INTO power_data (\`sensorid\`, \`date\`, \`volt\`, \`amp\`, \`watt\`) VALUES ('${PW_POWERSENSOR_ID['ServerRoom-AC']}','${LogDataTime}','${AIRCON_VOLT}','${AIRCON_AMP}','${AIRCON_WATT}')"
${mysql_conn} -e "USE servermonitor; ${QRY}"
# upsinfo=$(ssh -q -o ConnectTimeout=3 -o ConnectionAttempts=1 admin@10.2.1.1 'upsc CP1500PFCLCD')