Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Note that threaddump can be obtained programmatically and via Manager webapp.

...

This will produce a thread dump on standard output, but may not be possible to capture to a file.

Using Java code

If you cannot use any of the above methods, it is also possible to obtain a thread dump programmatically, with a Servlet or JSP page that runs within Tomcat. For example, you can use java.lang.Thread.getAllStackTraces() method.

Tomcat Manager web application in Tomcat 8 and later supports a command that outputs a thread dump. (Not yet documented)

How do I read a Java thread dump ?

...