ATS-Watts/etc/snmp/ats-watts.sh

10 lines
394 B
Bash
Raw Normal View History

#!/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