Actions
How to get Java thread dump in Jboss » History » Revision 3
« Previous |
Revision 3/4
(diff)
| Next »
chin-yeh, 11/11/2010 12:32 PM
How to get Java thread dump in Jboss¶
This guide is only applicable to:- Linux OS with netcat package installed
- Jboss AS 4.x (it may work for Jboss 5.x)
- first, find out the Jboss's web listening port and address.
- the listening port can be found in:
${Jboss Directory}/server/${profile name}/deploy/jboss-web.deployer/server.xml
- the listening address can be found in:
netstat -tuna | grep ${listening port}
- the listening port can be found in:
- ssh to the target server
- cd to /tmp
- execute the following command:
This command will output the result to current directory with a file named, thread_dump.${timestamp}- Template:
$ echo -e "GET /jmx-console/HtmlAdaptor?action=invokeOp&name=jboss.system%3Atype%3DServerInfo&methodIndex=1 \n\n" | nc listen_ip listen_port | cat > thread_dump.$(date +%Y-%m-%d_%H_%M_%S)
- replace listen_ip with the listening IP
- replace listen_port with the listening port
- Example:
$ echo -e "GET /jmx-console/HtmlAdaptor?action=invokeOp&name=jboss.system%3Atype%3DServerInfo&methodIndex=1 \n\n" | nc 127.0.0.1 8080 | cat > thread_dump.$(date +%Y-%m-%d_%H_%M_%S)
- Template:
- append the .html to the output file
From:thread_dump.2010-11-11_12_08_26
To:thread_dump.2010-11-11_12_08_26.html
- download the output file to local machine
- done.
Updated by chin-yeh about 14 years ago · 3 revisions