Update powerwall.sh
This commit is contained in:
@@ -57,9 +57,10 @@ CHECKTEMP(){
|
||||
for sensorname in "${vHOST_TEMPNAMES[@]}"; do
|
||||
echo ${t}
|
||||
temp_c=$(snmpwalk -v 1 -c public -t 2 10.10.2.20 .1.3.6.1.4.1.674.10892.5.4.700.20.1.6.1.${t} -O vq | sed -e 's/"//g')
|
||||
echo $temp_c
|
||||
temp_c=`echo "scale=2; ${temp_c}/10" | bc`
|
||||
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/ /}
|
||||
# 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/ /}
|
||||
|
||||
# reading=$(CHECKTEMPSENSOR ${SENSOR} ${temp_c} ${temp_warn} ${temp_crit} ${sensorname// /_} ${1})
|
||||
c=0; spc=''; spc1=`expr ${cw} - ${#sensorname} - 1`; until [ ${c} = ${spc1} ]; do spc="${spc} "; c=`expr ${c} + 1`; done
|
||||
|
||||
Reference in New Issue
Block a user