I am using kill -3
command to see the JVM's thread dump in unix. But where can I find the output of this kill
command? I am lost!!
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
With Java 8 in picture,
jcmd
is the preferred approach.Following is the snippet from Oracle documentation :
The release of JDK 8 introduced Java Mission Control, Java Flight Recorder, and jcmd utility for diagnosing problems with JVM and Java applications. It is suggested to use the latest utility, jcmd instead of the previous jstack utility for enhanced diagnostics and reduced performance overhead.
However, shipping this with the application may be licensing implications which I am not sure.
There is a way to redirect JVM thread dump output on break signal to separate file with LogVMOutput diagnostic option:
In the same location where the JVM's stdout is placed. If you have a Tomcat server, this will be the
catalina_(date).out
file.When using kill -3 one should see the thread dump in the standard output. Most of the application servers write the standard output to a separate file. You should find it there when using kill -3. There are multiple ways of getting thread dumps:
In Jboss you can perform the following
This will redirect your output/threadump to the file console specified in the above command.