From 9fe43380b6b33ce05bf7b3248bdb3c6da35cfc91 Mon Sep 17 00:00:00 2001 From: Ariel Antigua Date: Thu, 23 Aug 2018 11:21:19 -0400 Subject: [PATCH] ats-watts.sh Initial commit for amps/watts script. --- etc/snmp/ats-watts.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 etc/snmp/ats-watts.sh diff --git a/etc/snmp/ats-watts.sh b/etc/snmp/ats-watts.sh new file mode 100644 index 0000000..7ff609c --- /dev/null +++ b/etc/snmp/ats-watts.sh @@ -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