Check RINGO

#!/bin/bash
#Moved from ops01 and rewritten, Andrew Stringer 08/12/2010

# Pull the current connections per rng for importing in to cacti

LOG=/var/www/html/cacti/output/rng_connection.log

#delete previous log file
rm ${LOG}

#Use -i to ensure correct private key file is used.
#Use -b to force traffic out on the interface where host name lookups match both ways. Avoids error lines in server log files.
#Check for connections on port 10040

for RNGO in rng01 rng02 rng03 rng14 rng15 rng16
do
        RNGRES=`ssh -i ~/.ssh/id_dsa -b 172.27.206.210 ${RNGO} "netstat | grep 10040 | wc -l"`

        echo -n "${RNGO}:${RNGRES} " >> ${LOG}
done

#finish log file with cr
echo "" >> ${LOG}


exit 0

rb/checkringo.txt · Last modified: 03/10/2014 10:02 by andrew