tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: finding thread status when using tomcat as a window service??
Date Thu, 31 Jul 2008 17:26:00 GMT
Hash: SHA1


Please do not hijack threads by replying to an unrelated message.
Instead, create a new message to the list to start a new thread. (See
below for answer).

Thangavel Sankaranarayanan wrote:
| I am using tomcat as a window tat case how can i do a
| threaddump on it?

I'm no expert on Java on win32, but have some ideas.

Use "jstack" which comes with the JDK (and JRE?). It might not be
available on windows.

You can create a JSP that will do a thread dump by using (IIRC)
Thread.getThreadGroup and then ThreadGroup.getParent() recursively until
you've found the top-level ThreadGroup. From there, you can enumerate
all threads and do a thread dump on each one.

Oh course, that requires that you have an available request processing
thread in order to actually run the JSP.

You can use the same technique from a regular Java class that runs at
intervals. You'll probably have to restart the service in order to
install that class (maybe not -- a hot webapp re-deploy might work, and
leave your app in its locked state).

Another option is to use Cygwin to send a STOP signal to the JVM
process. I don't know if this actually works, and I don't know where
stdout goes on a win32 TC install (catalina.out?).

Also, Google is your friend:

- -chris
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message