THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
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 ?
...