Find out the number of connections to tomcat server

Thunderhashy picture Thunderhashy · Feb 5, 2010 · Viewed 46.6k times · Source

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?

Answer

BalusC picture BalusC · Feb 6, 2010

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.