You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kristian Rink <kr...@zimmer428.net> on 2007/01/17 09:27:19 UTC

Session Monitoring tool?

Folks;

does anyone know of any tomcat tool to watch HTTP sessions which
are active in any deployed web application (and, best case, data
assigned to them, aside the session ID itself)? I thought /manager
or /admin to provide functionality like this but so far I failed to
find it...

Thanks in advance and bye,
Kristian


-- 
Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
jab: kawazu@jabber.ccc.de * icq: 48874445 * fon: ++49 176 2447 2771
"One dreaming alone, it will be only a dream; many dreaming together
is the beginning of a new reality." (Hundertwasser)

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Session Monitoring tool?

Posted by JNeuhoff <ne...@mhccorp.com>.
You may want to implement your own HTTPSessionListener for your servlet. It
looks something like this:

package mypackage;

import javax.servlet.http.HttpSessionListener;
import javax.servlet.http.HttpSessionEvent;

public class SessionListener implements HttpSessionListener {

	static int activeSessions =	0;
	static int maxActiveSessions = 0;

	/** Session Creation	Event */
	public void sessionCreated( HttpSessionEvent se) {
		synchronized (this) {
			activeSessions++;
			if (activeSessions > maxActiveSessions) {
				maxActiveSessions = activeSessions;
			}
		}
	}

	/** Session Invalidation	Event */
	public void sessionDestroyed( HttpSessionEvent se) {
		synchronized(this) {
			if(activeSessions > 0) {
				activeSessions--;
			}
		}
	}

	/** get the number of currently active HTTP sessions */
	public static int getActiveSessions() {
		return activeSessions;
	}

	/** get the maximum active concurrent HTTP sessions used so far */
	public static int getMaxActiveSessions() {
		return maxActiveSessions;
	}

}



In your web.xml, add the following lines to make sure Tomcat sends the
events to your session listener during runtime:

    <!-- Listeners -->
    <listener>
        <listener-class>mypackage.SessionListener</listener-class>
    </listener>


Hope this helps.

J.Neuhoff



Kristian Rink wrote:
> 
> 
> Folks;
> 
> does anyone know of any tomcat tool to watch HTTP sessions which
> are active in any deployed web application (and, best case, data
> assigned to them, aside the session ID itself)? I thought /manager
> or /admin to provide functionality like this but so far I failed to
> find it...
> 
> Thanks in advance and bye,
> Kristian
> 
> 
> -- 
> Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
> jab: kawazu@jabber.ccc.de * icq: 48874445 * fon: ++49 176 2447 2771
> "One dreaming alone, it will be only a dream; many dreaming together
> is the beginning of a new reality." (Hundertwasser)
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Session-Monitoring-tool--tf3025864.html#a8489437
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Session Monitoring tool?

Posted by Ben Souther <be...@souther.us>.
What kind of information are you looking for?

If it's application specific data, it wouldn't be difficult to write
something yourself.

I have a sample app that shows the users logged in to the system, how
long they've been active, when the session times out, and what the last
page they've hit is.

See: http://simple.souther.us/not-so-simple.html 
Look for SessionMonitor.



On Mon, 2007-01-22 at 07:46, Kristian Rink wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> Chuck;
> 
> ["Caldarale, Charles R" <Ch...@unisys.com> @ Wed, 17 Jan 2007
> 09:31:48 -0600]
> > > Yes, there is, but the information it provides is rather limited (to
> > > telling me how many active sessions there are and what session
> > > timeout is set)...
> > 
> > Lambda Probe displays more information than Tomcat's manager app, but
> > I don't know if it's sufficient for your needs.  Get it at:
> > http://lambdaprobe.org/
> [...]
> > You should also take a look at MoSKito; lots of very detailed
> > information collected and displayed by it:
> > http://moskito.anotheria.net/
> 
> 
> Thanks a lot for the pointers; I'll check out the both and see what
> fits my needs best. :)
> 
> Thanks and bye,
> Kristian
> 
> 
> - -- 
> Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
> jab: kawazu@jabber.ccc.de * icq: 48874445 * fon: ++49 176 2447 2771
> "One dreaming alone, it will be only a dream; many dreaming together
> is the beginning of a new reality." (Hundertwasser)
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
> 
> iD8DBQFFtLI4cxBAPOA1m6wRArYDAKCPkWXiMsLBhoRAiLa721PSGRilmgCfRKIr
> XgEB2Enxh2ZQyjF5M2tcUro=
> =I0Mh
> -----END PGP SIGNATURE-----


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Session Monitoring tool?

Posted by Kristian Rink <kr...@zimmer428.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Chuck;

["Caldarale, Charles R" <Ch...@unisys.com> @ Wed, 17 Jan 2007
09:31:48 -0600]
> > Yes, there is, but the information it provides is rather limited (to
> > telling me how many active sessions there are and what session
> > timeout is set)...
> 
> Lambda Probe displays more information than Tomcat's manager app, but
> I don't know if it's sufficient for your needs.  Get it at:
> http://lambdaprobe.org/
[...]
> You should also take a look at MoSKito; lots of very detailed
> information collected and displayed by it:
> http://moskito.anotheria.net/


Thanks a lot for the pointers; I'll check out the both and see what
fits my needs best. :)

Thanks and bye,
Kristian


- -- 
Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
jab: kawazu@jabber.ccc.de * icq: 48874445 * fon: ++49 176 2447 2771
"One dreaming alone, it will be only a dream; many dreaming together
is the beginning of a new reality." (Hundertwasser)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFFtLI4cxBAPOA1m6wRArYDAKCPkWXiMsLBhoRAiLa721PSGRilmgCfRKIr
XgEB2Enxh2ZQyjF5M2tcUro=
=I0Mh
-----END PGP SIGNATURE-----

RE: Session Monitoring tool?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Kristian Rink [mailto:kristian@zimmer428.net] 
> Subject: Re: Session Monitoring tool?
> 
> Yes, there is, but the information it provides is rather limited (to
> telling me how many active sessions there are and what session timeout
> is set)...

Lambda Probe displays more information than Tomcat's manager app, but I
don't know if it's sufficient for your needs.  Get it at:
http://lambdaprobe.org/

I have no affiliation with the above product - just a satisfied user of
it.

You should also take a look at MoSKito; lots of very detailed
information collected and displayed by it:
http://moskito.anotheria.net/

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Session Monitoring tool?

Posted by Kristian Rink <kr...@zimmer428.net>.
Hi there;

and at first thanks for your reply.

["Foo Shyn" <fo...@optegra.com.my> @ Wed, 17 Jan 2007 16:33:35 +0800]

> Hmm correct me if i'm wrong, but isn't there's a 'Session' Column in
> the manager list page where the active session of each web
> application would be displayed?

Yes, there is, but the information it provides is rather limited (to
telling me how many active sessions there are and what session timeout
is set)...

Cheers,
Kristian

-- 
Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
jab: kawazu@jabber.ccc.de * icq: 48874445 * fon: ++49 176 2447 2771
"One dreaming alone, it will be only a dream; many dreaming together
is the beginning of a new reality." (Hundertwasser)

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Session Monitoring tool?

Posted by Foo Shyn <fo...@optegra.com.my>.
Hmm correct me if i'm wrong, but isn't there's a 'Session' Column in the 
manager list page where the active session of each web application would be 
displayed?

Thanx.
Regards,
FooShyn
----- Original Message ----- 
From: "Kristian Rink" <kr...@zimmer428.net>
To: <us...@tomcat.apache.org>
Sent: Wednesday, January 17, 2007 4:27 PM
Subject: Session Monitoring tool?


>
> Folks;
>
> does anyone know of any tomcat tool to watch HTTP sessions which
> are active in any deployed web application (and, best case, data
> assigned to them, aside the session ID itself)? I thought /manager
> or /admin to provide functionality like this but so far I failed to
> find it...
>
> Thanks in advance and bye,
> Kristian
>
>
> -- 
> Kristian Rink * http://zimmer428.net * http://flickr.com/photos/z428/
> jab: kawazu@jabber.ccc.de * icq: 48874445 * fon: ++49 176 2447 2771
> "One dreaming alone, it will be only a dream; many dreaming together
> is the beginning of a new reality." (Hundertwasser)
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
> 



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org