Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Users in a server

 
gokulanand narayanan
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to know about the total number of users using a particular application in a particular server .

Thanks in advance.
 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure about Tomcat specific tools. But I'd do it manually in my application. Use a HttpSessionListener to register the sessions created into the servlet context. Now we could write an admin servlet to retreive the registered sessions from the servlet context which tell us many things including no. of current users.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Tomcat Manager application can tell you how many current sessions a given web application has. I use it all the time for a quick glance at the state of the server.
Naturally this is only the count of sessions that have not expired so it is a maximum, not the number of active users. In order to use the Manager you have to configure a user with permission to see it - the default Tomcat installation has an extensive discussion.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic