-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thangavel,

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 service..in tat case how can i do a
| threaddump on it?

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

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

#2
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).

#3
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:
http://wiki.caucho.com/Thread_dump

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkiR9agACgkQ9CaO5/Lv0PCVPQCgxDEvFRoNFydxQm3r6HubxMfn
K4wAoKwfkKDZu17fEi0649NlrXhsBtLc
=l0To
-----END PGP SIGNATURE-----

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

Reply via email to