From 0abf171e8a493636320941c790f4288c0546b7f6 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 23 Oct 2023 08:30:08 -0500 Subject: [PATCH] Update powerwall.sh --- powerwall.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/powerwall.sh b/powerwall.sh index 4b208942..8a776adb 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -56,6 +56,7 @@ CHECKTEMP(){ temp_c=$(echo ${sensordata} | cut -d'p' -f2 | awk '/ / {print $2}' | sed -e 's/C//g'); temp_c=${temp_c/ /} temp_warn=$(echo ${sensordata} | cut -d'p' -f2 | awk '/ / {print $7}' | sed -e 's/C//g'); temp_warn=${temp_warn/ /} temp_crit=$(echo ${sensordata} | cut -d'p' -f2 | awk '/ / {print $4}' | sed -e 's/C//g'); temp_crit=${temp_crit/ /} + echo "HERE: ${SENSOR} - ${vSENSOR// /_}" reading=$(CHECKTEMPSENSOR ${SENSOR} ${temp_c} ${temp_warn} ${temp_crit} ${vSENSOR// /_}) c=0; spc=''; spc1=`expr ${cw} - ${#vSENSOR} - 1`; until [ $c = ${spc1} ]; do spc="${spc} "; c=`expr $c + 1`; done echo -e "${idsCL[LightCyan]} ${vSENSOR}${spc}${idsCL[Default]}: ${reading}" @@ -154,7 +155,7 @@ AVERAGETEMP(){ if [ "${PW_SENSOR_TYPE[${sensorid}]}" == "esxi" ]; then entityid=($(${mysql_conn} -e "SELECT id FROM servermonitor.entities WHERE BINARY name='${3}' AND sensorid='${sensorid}'")) entityid=${entityid[1]} - echo "HERE: ${3} - ${entityid}" + # echo "HERE: ${3} - ${entityid}" WHERE="sensorid=${sensorid} AND entity=${entityid}" else WHERE="sensorid=${sensorid}"