Skip to content

Instantly share code, notes, and snippets.

@laszlomiklosik
Created December 13, 2012 14:49
Show Gist options
  • Save laszlomiklosik/4276835 to your computer and use it in GitHub Desktop.
Save laszlomiklosik/4276835 to your computer and use it in GitHub Desktop.
Monitor open threads with refresh
while true ; do
date
echo "DB1 threads: `netstat -an |grep '68.20' |grep ESTABLISHED|wc -l`" ;
echo "DB2 threads: `netstat -an |grep '67.20' |grep ESTABLISHED|wc -l`" ;
echo "ajp threads: `netstat -an |grep 8009 |grep ESTABLISHED|wc -l`" ;
echo "HINT if you see errors check details with: tail -1000 /var/log/catalina.out |grep ERROR -A 50 -B 50"
tail -500 /var/log/catalina.out |grep ERROR|tail -n 20
sleep 5;
clear;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment