You can generate 4-5 stream dumps as described below, and then analyze them using tools such as Samurai .
What do you want to check when a stuck thread or a long transaction occurs, all thread dumps show that a specific thread identifier is on the same line in your java stack trace. In simpler terms, a transaction covers several dumps of flows and, therefore, requires further study.
Now, when you run them through Samurai , he will highlight them in red so that you can quickly click on it and go to the lines showing the problems.
See an example of this here . Look at the output image of the samurai in this link. Green cells are beautiful. Red and gray cells need to be searched.
Creating a stream dump:
(Linux)
If the JVM is running in the console, just press Ctrl-\ . If the JVM is running in the background, send a QUIT signal to it:
kill -QUIT process_id
Here process_id is the process number of the running Java process. A stream dump will be sent to where the standard output is also redirected. You can usually get the process numbers of all running Java processes using the command:
ps axf | grep java
aviad
source share