ats-watts.sh

Initial commit for amps/watts script.
master
Ariel Antigua 2018-08-23 11:21:19 -04:00
parent 075d74e553
commit 9fe43380b6
1 changed files with 9 additions and 0 deletions

9
etc/snmp/ats-watts.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
# Script file to convert data coming from ATS.
# need to sum the values.
VAL1=`snmpwalk -v 1 -c aanet 172.22.35.44 1.3.6.1.4.1.318.1.1.8.5.4.3.1.4.1.1.1 | awk -F "" '{print $52}'`
VAL2=`snmpwalk -v 1 -c aanet 172.22.35.44 1.3.6.1.4.1.318.1.1.8.5.4.3.1.4.1.1.1 | awk -F "" '{print $53}'`
ENDVAL1="$VAL1"."$VAL2"
ENDVAL2="$ENDVAL1"*"110"
ENDVAL3=`echo $ENDVAL2 | bc -l`
echo $ENDVAL3