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?
Most reliable way would be to search for ip.addr.of.srv:port
in netstat
. Here's the Windows based example (sorry, no Linux guru here ;) )
netstat -np tcp | find "12.34.56.78:80"
Replace 12.34.56.78
by IP where Tomcat listens on and 80
by port where Tomcat listens on.
This is actually not a programming problem, hence I voted to migrate this question to serverfault.com.