Project

General

Profile

Using jmx-console and tomcat status (production) » History » Version 3

chin-yeh, 06/28/2011 05:35 PM

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
34
35
h2. Example URLs for jmx-console & tomcat status
36
37
* List of currently serving web request:
38
<pre>http://<<ip address>>:9999/status?full=true</pre>
39
* Connection pool usage: 
40
<pre>
41
http://<<ip address>>:9999/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.jca%3Aservice%3DManagedConnectionPool%2Cname%3D<<connection pool name>>
42
43
ip address - IP address of the server
44
connection pool name - the name of the connection pool
45
</pre>
46
* Thread Dump & memory usage:
47
<pre>
48
http://<<ip address>>:9999/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system%3Atype%3DServerInfo
49
</pre>
50