How to get memory pool in Jboss » History » Version 1
chin-yeh, 11/11/2010 12:35 PM
1 | 1 | chin-yeh | h1. How to get memory pool in Jboss |
---|---|---|---|
2 | |||
3 | This guide is only applicable to: |
||
4 | * Linux OS with *netcat* package installed |
||
5 | * Jboss AS 4.x (it may work for Jboss 5.x) |
||
6 | |||
7 | *Steps* |
||
8 | # first, find out the Jboss's web listening port and address. |
||
9 | ## the listening port can be found in: |
||
10 | <pre> |
||
11 | ${Jboss Directory}/server/${profile name}/deploy/jboss-web.deployer/server.xml |
||
12 | </pre> |
||
13 | ## the listening address can be found through *netstat*: |
||
14 | <pre> |
||
15 | $ netstat -tuna | grep ${listening port} |
||
16 | </pre> |
||
17 | # ssh to the target server |
||
18 | # *cd* to */tmp* |
||
19 | # execute the following command: |
||
20 | This command will output the result to current directory with a file named, memory_pool.${timestamp} |
||
21 | ** *Template:* |
||
22 | <pre> |
||
23 | $ echo -e "GET /jmx-console/HtmlAdaptor?action=invokeOp&name=jboss.system%3Atype%3DServerInfo&methodIndex=2&arg0=True \n\n" | nc listen_ip listen_port | cat > memory_pool.$(date +%Y-%m-%d_%H_%M_%S) |
||
24 | </pre> |
||
25 | *** replace *listen_ip* with the listening IP |
||
26 | *** replace *listen_port* with the listening port |
||
27 | ** *Example:* |
||
28 | <pre> |
||
29 | $ echo -e "GET /jmx-console/HtmlAdaptor?action=invokeOp&name=jboss.system%3Atype%3DServerInfo&methodIndex=2&arg0=True \n\n" | nc 127.0.0.1 8080 | cat > memory_pool.$(date +%Y-%m-%d_%H_%M_%S) |
||
30 | </pre> |
||
31 | # append the *.html* to the output's filename |
||
32 | *From:* |
||
33 | <pre> |
||
34 | memory_pool.2010-11-11_12_08_26 |
||
35 | </pre> |
||
36 | *To:* |
||
37 | <pre> |
||
38 | memory_pool.2010-11-11_12_08_26.html |
||
39 | </pre> |
||
40 | # download the output file to local machine |
||
41 | # done. |