Search for:

Version 2 of 31.3.06, 14:16
Home - Latest - Tags - History - Referers

Create user - Lost password
Just visited:
AstRecipes»Administering QueueMetrics using Tomcat

And all is quiet....

AstRecipes » Administering QueueMetrics using Tomcat

If you run QueueMetrics, it's often useful to know how many people are using the webapp at once. This recipe shows how to use the Tomcat manager interface that comes shipped with the standard Tomcat webapps to perform this task.

You have to perform the following steps:

star Edit tomcat/conf/tomcat-users.xml so that there is a user of your choice who has the role manager, like the user called me in the following example:

<?xml version='1.0' encoding='utf-8'?>
  <role rolename="tomcat"/>
  <role rolename="role1"/>
  <role rolename="manager"/>
  <user username="tomcat" password="tomcat" roles="tomcat"/>
  <user username="both" password="tomcat" roles="tomcat,role1"/>
  <user username="role1" password="tomcat" roles="role1"/>
  <user username="me" password="yessir" roles="tomcat,manager"/>

star Shutdown and restart Tomcat
star Run the following command to know the active sessions for the webapp queuemetrics running in the Tomcat instance on the same server:

links -dump http://me:yessir@

The output will look something like:

OK - Session information for application at context path /queuemetrics
Default maximum session inactive interval 30 minutes
30 - <40 minutes:54 sessions

This means that there are currently 54 active, non-expired sessions running.