SNMP: Capturing SSL Statistics per Virtual Server
Published Nov 14, 2007
Version 1.0Was this article helpful?
This is from an article Nathan Bultman wrote:
! /bin/bash
This script calculates TPS for any host. This script assumes that the SNMP community name is public and that
it uses version 2C of SNMP.
HOST=$1
COMMUNITY="public"
TNCs="F5-BIGIP-SYSTEM-MIB::sysClientsslStatTotNativeConns.0"
TCCs="F5-BIGIP-SYSTEM-MIB::sysClientsslStatTotCompatConns.0"
interval=10 seconds
TNC1=`snmpget -Ov -Oe -Ot -Oq -v2c -c $COMMUNITY $HOST $TNCs`
TCC1=`snmpget -Ov -Oe -Ot -Oq -v2c -c $COMMUNITY $HOST $TCCs`
echo "sleeping... do not disturb"
sleep $interval
TNC2=`snmpget -Ov -Oe -Ot -Oq -v2c -c $COMMUNITY $HOST $TNCs`
TCC2=`snmpget -Ov -Oe -Ot -Oq -v2c -c $COMMUNITY $HOST $TCCs`
echo "TCC1=$TCC1 TCC2=$TCC2 TNC1=$TNC1 TNC2=$TNC2"
let TPS="(($TNC2-$TNC1)+($TCC2-$TCC1)) /$interval"
echo "`date` $TPS" >> TPS_over_time.txt
You can then import the TPS_over_time.txt file into gnuplot, openOffice, koffice, or MS-Excel and make a graph of TPS over time.