How do you generate and analyze a thread dump from a running JBoss instance?

前端 未结 7 2151
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-16 04:28

How do you generate and analyze a thread dump from a running JBoss instance?

7条回答
  •  隐瞒了意图╮
    2020-12-16 05:06

    http://java.sun.com/developer/technicalArticles/Programming/Stacktrace/

    ...

    "On UNIX platforms you can send a signal to a program by using the kill command. This is the quit signal, which is handled by the JVM. For example, on Solaris you can use the command kill -QUIT process_id, where process_id is the process number of your Java program.

    Alternatively you can enter the key sequence \ in the window where the Java program was started. Sending this signal instructs a signal handler in the JVM, to recursively print out all the information on the threads and monitors inside the JVM."

    ...

    "Determining the Thread States

    You will see many different threads in many different states in a snapshot from a JVM stack trace. The key used is:

    R Running or runnable thread

    S Suspended thread

    CW Thread waiting on a condition variable

    MW Thread waiting on a monitor lock

    MS Thread suspended waiting on a monitor lock"

提交回复
热议问题