Tomcat's ThreadDump Collection

I am trying to get the JVM threaddump. I used top and ps aux to find the process id and user pid [who is root].

So, I run the following command to get the threaddump

sudo -u root jstack -F PID> threaddump1.txt

But I am getting the following exception ---------------------------------

Error while connecting to process: not a HotSpot virtual machine (could not find symbol "gHotSpotVMTypes" in remote process)

sun.jvm.hotspot.debugger.DebuggerException: Doesn't appear to be a HotSpot VM (could not find symbol "gHotSpotVMTypes" in remote process)**
    at sun.jvm.hotspot.HotSpotAgent.setupVM(HotSpotAgent.java:411)
    at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:305)
    at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:140)
    at sun.jvm.hotspot.tools.Tool.start(Tool.java:185)
    at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
    at sun.jvm.hotspot.tools.JStack.main(JStack.java:92)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at sun.tools.jstack.JStack.runJStackTool(JStack.java:140)
    at sun.tools.jstack.JStack.main(JStack.java:106)

      

Any help or suggestion or input is deeply appreciated.

+1


source to share


1 answer


Ok. I was finally able to sort out the problem. The cat worked under the docker. So I have to run commands in docker. I followed the steps below.



1. Access the docker
2. Find the PID of tomcat by running command within docker.
3. Run command /<oracle path>/bin/jstack PID >> filename

      

+2


source







All Articles