Using jmx-console and tomcat status (production) » History » Version 4
chin-yeh, 06/29/2011 09:37 AM
1 | 2 | chin-yeh | {{toc}} |
---|---|---|---|
2 | |||
3 | h1. Using jmx-console & tomcat status (production) |
||
4 | |||
5 | In production environment, the *Jboss* application server listens to IP, *127.0.0.1* and port *8080*. In order to use the jmx-console through *VPN*, one must redirect the traffic in the port *8080* to a specific port. In this guide, the port, *9999* will be used for this purpose. |
||
6 | |||
7 | |||
8 | h2. Steps |
||
9 | |||
10 | # login to the server via *ssh* which has jmx-console running |
||
11 | # *cd* to */tmp* |
||
12 | <pre> |
||
13 | $ cd /tmp |
||
14 | </pre> |
||
15 | # locate the file, *backpipe* |
||
16 | ## if *exists*, skip and proceed to next step |
||
17 | ## if *not exists*, execute(without the dollar sign): |
||
18 | <pre> |
||
19 | $ mknod backpipe p |
||
20 | </pre> |
||
21 | # execute the following command for *port traffic redirection*(without the dollar sign): |
||
22 | <pre> |
||
23 | $ nc -l -p 9999 0<backpipe | nc 127.0.0.1 8080 1>backpipe |
||
24 | </pre> |
||
25 | # launch web browser and navigate to the jmx-console: |
||
26 | <pre> |
||
27 | 3 | chin-yeh | e.g. http://<<vpn IP address>>:9999/jmx-console/ |
28 | 2 | chin-yeh | </pre> |
29 | # done |
||
30 | |||
31 | * *[Important Note]* You may need to re-execute the command in *step 4* periodically should it get terminated. |
||
32 | * *[Important Note]* One should use it for *troubleshooting* purpose only, not *monitoring*. |
||
33 | 4 | chin-yeh | * *[Important Note]* The port *8080* can be redirected because there's *no application* is actively using the port, instead the ajp port, *8009* is used to serve the web request. |
34 | 2 | chin-yeh | |
35 | |||
36 | h2. Example URLs for jmx-console & tomcat status |
||
37 | |||
38 | * List of currently serving web request: |
||
39 | <pre>http://<<ip address>>:9999/status?full=true</pre> |
||
40 | * Connection pool usage: |
||
41 | <pre> |
||
42 | http://<<ip address>>:9999/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.jca%3Aservice%3DManagedConnectionPool%2Cname%3D<<connection pool name>> |
||
43 | |||
44 | ip address - IP address of the server |
||
45 | connection pool name - the name of the connection pool |
||
46 | </pre> |
||
47 | * Thread Dump & memory usage: |
||
48 | <pre> |
||
49 | http://<<ip address>>:9999/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system%3Atype%3DServerInfo |
||
50 | </pre> |
||
51 |