I have a Java/Java EE web application deployed on Tomcat Server 5.5.17. I want to know the number of clients which are connected to the server. How can we find it out?
And if you need to figure to what each connection is doing , use this on linux
netstat -an | grep :8080 | awk '{print $6}'
If there are three connections , you will see
LISTEN TIME_WAIT TIME_WAIT
And if you only want to count connections which are in TIME_WAIT state
netstat -an | grep :8080 | grep TIME_WAIT | wc -l