Thread Dump Analyzer [closed]
Asked Answered
F

3

7

Do you know some good thread dump analyzer tool? Perfect would be :

  • free
  • can read a few thread dumps and compare them
  • point out which threads took the longest, what are the classes that the thread is locked on etc.
  • shows threads, locks, deadlocks and multiple threads waiting to acquire a single lock

Edit:

  • offline analyze - load file with one or many thread dump and analyze it.

Edit: My choice is: Samurai. It has all the features I need: Loads logfile, and compares few thread dumps. Analyze it and points:

  • waiting threads
  • blocked threads
  • blocking threads
  • deadlock

I'll leave question as answered because TDA is the best answer that was given.

Fescue answered 14/11, 2012 at 8:15 Comment(1)
i found the spotify thread dump analyzer helpful spotify.github.io/threaddump-analyzerGide
C
7

You could use TDA - Thread Dump Analyser, a plug-in for Visual VM.

Visual VM is free as well. I think this is your best choice.

If you are on Linux you could use kill -3 to get a thread dump and look for deadlocks using using Thread Dump Analyzer.

VisualVM now ships as part of the JDK and can be used monitor memory usage, threads and also includes a profiler.

jmap can be used to obtain heap histograms and heap dumps from Java processes. You could then use a tool like Eclipse Memory Analyzer to investigate it.

As another answer mentioned you could look into JMX and JConsole. For each service in our application we have a MBean so we can view keys stats such as queue sizes to check if anything seems out of the ordinary.

From Tools and tips for Sun JVM troubleshooting on ServerFault.

Cooncan answered 14/11, 2012 at 8:18 Comment(4)
As far as I see, in visualvm I cannot do offline analize. Did I missed something? In my case I cannot connect analizer to running instance.Fescue
@AugustinGhauratto how are planning to get the threads without connecting to the running instance ?Cooncan
On linux: kill -3 java_instance_pid , generates thread dump to console log. I cannot afford to give an instance with heavy load more burden. And I don't have physical possibility to do so - sshd has forwarding disabled, and visualvm as far as I did investigate it is graphical tool.Fescue
Any advice on how to install this on VisualVM/JDK 1.8.0_144 (and in other newer versions, I suspect)? It doesn't appear in the plugin update listings. The wiki recommends to download it manually from the "TDA website", but the site seems to be long gone... And there are no release artifacts in the GitHub releases page either :(Valenba
S
3

In case you use IBM JRE you should use IBM Thread and Monitor Dump Analyzer for Java, which offers exactly what you need (offline use, comparisons etc).

Surgeonfish answered 26/11, 2012 at 10:25 Comment(0)
L
0

You could try my Dump Analyzer. I had the same need and developed my own dump analyzer. It has some of the features of your list.

Lonne answered 2/4, 2014 at 18:2 Comment(1)
I don't understand why should be a comment, my answer is like the rest of answers... every answer is offering an app for analyzing threads dumps. By the way, the project is now on Github: https://github.com/sergiocormio/dump-analyzerLonne

© 2022 - 2024 — McMap. All rights reserved.