Update power.inc.sh

This commit is contained in:
2024-02-11 09:53:35 -06:00
parent 8a82b50e7a
commit f1585c0e00

View File

@@ -231,7 +231,7 @@ CHECKPOWER(){
AD=$(IDS_NUMBER_FORMAT ${AIRCON_AMP} 2 yes); c=0; spc=''; spc1=`expr ${wspc} - ${#AD}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; ((c++)); done AD=$(IDS_NUMBER_FORMAT ${AIRCON_AMP} 2 yes); c=0; spc=''; spc1=`expr ${wspc} - ${#AD}`; until [ ${c} = ${spc1} ]; do spc="${spc} "; ((c++)); done
echo -en "${idsCL[White]}Air Conditioner ${idsCL[Default]}: ${idsCL[Green]}${AD}'A${spc}`IDS_NUMBER_FORMAT ${AIRCON_WATT} 0`'W" echo -en "${idsCL[White]}Air Conditioner ${idsCL[Default]}: ${idsCL[Green]}${AD}'A${spc}`IDS_NUMBER_FORMAT ${AIRCON_WATT} 0`'W"
if [ "${avgdays}" != "" ]; then if [ "${avgdays}" != "" ]; then
echo -en " ${idsCL[Yellow]}Calculating Air Conidtioner Averages ... " echo -en "${idsCL[Yellow]} Calculating Air Conidtioner Averages ... "
AIRCON_avg=$(AVERAGEPOWER ${PW_POWERSENSOR_ID['ServerRoom-AC']} ${avgdays} both) AIRCON_avg=$(AVERAGEPOWER ${PW_POWERSENSOR_ID['ServerRoom-AC']} ${avgdays} both)
AIRCON_AMP_avg=$(echo ${AIRCON_avg} | cut -d'~' -f 1) AIRCON_AMP_avg=$(echo ${AIRCON_avg} | cut -d'~' -f 1)
AIRCON_WATT_avg=$(echo ${AIRCON_avg} | cut -d'~' -f 2) AIRCON_WATT_avg=$(echo ${AIRCON_avg} | cut -d'~' -f 2)