Sunday, September 20, 2015

Simple script to caputure socket connection information on SM Policy server




# Written by Kishore Thotakoora to troubleshoot Q3-2015 login.fcc latency issues
#!/bin/ksh

host=`hostname`

count1707=`netstat -an | grep 1707 | wc -l`
echo "=======================================================================" >> /opt/siteminder/netegrity/log/NoOfConnections.log
echo `date` >> /opt/siteminder/netegrity/log/NoOfConnections.log
echo "=======================================================================" >> /opt/siteminder/netegrity/log/NoOfConnections.log
echo "No of Sockets established to 1707 are: $count1707" >> /opt/siteminder/netegrity/log/NoOfConnections.log
count1708=`netstat -an | grep 1708 | wc -l`
echo "No of Sockets established to 1708 are: $count1708" >> /opt/siteminder/netegrity/log/NoOfConnections.log

count44443_ESTABLISHED=`netstat -an | grep 44443 | grep ESTABLISHED | wc -l`
echo "No of Sockets established to 44443 are: $count44443_ESTABLISHED" >> /opt/siteminder/netegrity/log/NoOfConnections.log
count44443_SYN_SENT=`netstat -an | grep 44443 | grep SYN_SENT | wc -l`
echo "No of connections Attempts to establish a connection on 44443 are: $count44443_SYN_SENT" >> /opt/siteminder/netegrity/log/NoOfConnections.log

No comments: