This post originated from an RSS feed registered with Java Buzz
by Vinny Carpenter.
Original Post: Making Java VM thread-dumps more meaningful
Feed Title: Vinny Carpenter's Blog
Feed URL: http://www.j2eegeek.com/error.html
Feed Description: Welcome to my blog. I am a total Java geek that lives in Milwaukee, making my living as an architect/developer, spending all my time with Java, J2EE, OO, Linux, and open source. In my spare time, when I am not in front of my computers, I spend every other minute with my other loves: My wife, books, music, guitars, Formula-1 racing and StarGate. Check out my blog @ http://www.j2eegeek.com/blog
BEA's dev2dev has published a great article on thread dumps and tools for making the reading and parsing of them easier. For the uninitiated, thread dumps show the state of all threads at that point in time for any given process including a JVM. In UNIX, sending a process a -3 or -QUIT will generate the thread dump and send it out to system.out. On Windows, you can send a CTRL-BREAK in the DOS Window to generate the thread dump. Thread dumps are really helpful in debugging issues with your application, especially with deadlock issues.
In my blog entry entitled My Love Affair with JRockit, I showed how JRockit has the facility built into it to generate thread-dumps for any running JRockit VM.
In this dev2dev article, the author discusses the idea of taking the hard-to-read thread dumps and then converting them to XML to add some structure. Once the thread-dumps are converted to XML, you can apply a XSL stylesheet to format the XML document into something more readable and meaningful. In the article, the author converts a XML thread-dump into an HTML document and an image (700k). Great read and a great idea.