How do you generate and analyze a thread dump from a running JBoss instance?
Two options:
OPTION 1 Generate a thread dump using JMX Console
In order to generate a thread dump:
http://localhost:8080 )jboss.system:type=ServerInfo mbean (hint: you can probably just CTRL-F and enter type=ServerInfo in the dialog box)listThreadDumpNotes:
If you are using Internet Explorer you should use File > Save As to save the output instead of copying the data to a text editor. For some reason when you copy the text from Internet Explorer the line breaks are not copied and all of the output ends up on a single line.
OPTION 2 Generate a Thread Dump using Twiddle
Alternatively you can use twiddle to execute the listThreadDump() method and pipe the returned HTML directly to file. Use this command line:
/bin/twiddle invoke "jboss.system:type=ServerInfo" listThreadDump > threads.html