How to Count Active Sessions in Tomcat 7.

Document ID : KB000011411
Last Modified Date : 14/02/2018
Show Technical Document Details

 How to count Active Sessions from Tomcat 7.

All supported releases with a Java Agent running Tomcat 7.

Add the following instrumentation under the Tomcat pbd. Then restart the agent.

-TraceOneMethodOfClass: org.apache.catalina.session.StandardSession expire
(Z) V SimpleDecrementor "Tomcat: Number of sessions"
TraceOneMethodOfClass: org.apache.catalina.session.StandardSession
SimpleIncrementor "Tomcat: Number of sessions"