*
The moose likes Tomcat and the fly likes How to find the number of active users logged in tomcat server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to find the number of active users logged in tomcat server" Watch "How to find the number of active users logged in tomcat server" New topic
Author

How to find the number of active users logged in tomcat server

Hemanth Kumar Simhadri
Ranch Hand

Joined: Apr 22, 2010
Posts: 32
Hello guys,
We have our application server in cluster mode with 4 tomcats running parallelly in our production environment. I would like to know how many users have logged in a particular server at a given time. No HTTP Listener configuration has been done in the production tomcat server sofar to achieve this. Now, without doing any new configuration to the existing tomcat server, is it possible to find this out by using any tool or any external java program. As I cannot stop the production server at the moment, I want to achieve this with any external program. Please help me with this.


Regards,
Hemanth
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15958
    
  19

You don't "log in" to Tomcat. What we normally refer to as logging in is done to applications, not to the application container. Depending on which security Realm is used and how they are configured. Each app may have its own login environment or multiple apps may share an environment (Realm).

That's assuming that all the apps are using the J2EE standard container-managed security subsystem. Apps that use propriety login schemes are a different bucket of worms entirely, and anything done to track those kinds of apps has to be done on a custom basis.

Often - especially in a cluster - what's more important than how many people are logged in is how many people have active sessions. You can have a session without being logged in, and it's worth knowing about sessions, because they can give an indication of how much memory resources are in use, overhead in session propagation in a cluster, and whether it's safe to shutdown an app where there might me non-secured users who would be annoyed if the app dropped out from under them.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to find the number of active users logged in tomcat server
 
Similar Threads
Allowing the internal users and authenticating the external users.
alternative for tomcat in production enviorment
How to find online users in webapplication?
Linux Tomcat: java.net.BindException: Permission denied:80
external program connection to web server should trigger pop up