Hello All,
I have written a script which i run on admin server to display the count of transaction on rest of the service blades. here is the code
s=''
if [ $# -gt 0 ]
then
s=$1
fi
if [ "$s" = "-s" ]
then
TPS=`on tswebpxmp1 snmpget -c public -v 2c 127.0.0.1:1610 1.3.6.1.4.1.12702.9.2.6.2.0 | grep Counter64 | sed -e's;^.*Counter64: ;;'`
RSTRT=`on tswebpxmp1 snmpget -c public -v 2c 127.0.0.1:1610 1.3.6.1.4.1.12702.9.2.11.2.0 | grep Counter64 | sed -e's;^.*Counter64: ;;'`
RSTOP=`on tswebpxmp1 snmpget -c public -v 2c 127.0.0.1:1610 1.3.6.1.4.1.12702.9.2.12.2.0 | grep Counter64 | sed -e's;^.*Counter64: ;;'`
echo "`date +'%H:%Mh Traffic TPS: '`" $TPS
echo "`date +'%H:%Mh Radius Start/sec: '`" $RSTRT
echo "`date +'%H:%Mh Radius Stopp/sec: '`" $RSTOP
else
TPS=`on tswebpxmp1 snmpget -c public -v 2c 127.0.0.1:1610 1.3.6.1.4.1.12702.9.2.6.2.0 | grep Counter64 | sed -e's;^.*Counter64: ;;'`
PTPS=`on tswebpxmp1 snmpget -c public -v 2c 127.0.0.1:1610 1.3.6.1.4.1.12702.9.2.3.2.0 | grep Counter64 | sed -e's;^.*Counter64: ;;'`
TTPS=`on tswebpxmp1 snmpget -c public -v 2c 127.0.0.1:1610 1.3.6.1.4.1.12702.9.2.8.2.0 | grep Counter64 | sed -e's;^.*Counter64: ;;'`
WTPS=`on tswebpxmp1 snmpget -c public -v 2c 127.0.0.1:1610 1.3.6.1.4.1.12702.9.2.14.2.0 | grep Counter64 | sed -e's;^.*Counter64: ;;'`
RSTRT=`on tswebpxmp1 snmpget -c public -v 2c 127.0.0.1:1610 1.3.6.1.4.1.12702.9.2.11.2.0 | grep Counter64 | sed -e's;^.*Counter64: ;;'`
RSTOP=`on tswebpxmp1 snmpget -c public -v 2c 127.0.0.1:1610 1.3.6.1.4.1.12702.9.2.12.2.0 | grep Counter64 | sed -e's;^.*Counter64: ;;'`
echo "`date +'%H:%Mh Total TPS: '`" $TPS
echo "`date +'%H:%Mh Transparent TPS: '`" $TTPS
echo "`date +'%H:%Mh Proxy TPS: '`" $PTPS
echo "`date +'%H:%Mh WAP1 TPS: '`" $WTPS
echo "`date +'%H:%Mh Radius Start/sec: '`" $RSTRT
echo "`date +'%H:%Mh Radius Stopp/sec: '`" $RSTOP
fi
It actually get the value through snmpget command. The output is as below.
[xmp@tswebpxmpadmin bin]$ curtps
13:48h Total TPS: 6673
13:48h Transparent TPS: 5236
13:48h Proxy TPS: 1080
13:48h WAP1 TPS: 0
13:48h Radius Start/sec: 71
13:48h Radius Stopp/sec: 73
The above value of Total TPS is for all service blades. Now i want a script to show details about each blade. i.e. number of transactions each blades are handling. Any help is appreciated.
-Siddhesh.K