Project

General

Profile

Using jmx-console and tomcat status (production) » History » Revision 5

Revision 4 (chin-yeh, 06/29/2011 09:37 AM) → Revision 5/7 (chin-yeh, 07/08/2011 09:23 AM)

{{toc}} 

 h1. Using jmx-console & tomcat status (production) 

 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. 


 h2. Steps 

 # login to the server via *ssh* which has jmx-console running 
 # *cd* to */tmp* 
 <pre> 
 $ cd /tmp 
 </pre> 
 # locate the file, *backpipe* 
 ## if *exists*, skip and proceed to next step 
 ## if *not exists*, execute(without the dollar sign): 
 <pre> 
 $ mknod backpipe p 
 </pre> 
 # execute the following command for *port traffic redirection*(without the dollar sign): 
 <pre> 
 $ nc -l -p 9999 0<backpipe | nc 127.0.0.1 8080 1>backpipe 
 </pre> 
 # launch web browser and navigate to the jmx-console: 
 <pre> 
 e.g. http://<<vpn IP address>>:9999/jmx-console/ 
 </pre> 
 # done 

 * *[Important Note]* You may need to re-execute the command in *step 4* periodically should it get terminated. 
 * *[Important Note]* One should use it for *troubleshooting* purpose only, not *monitoring*. 
 * *[Important Note]* The port *8080* can be redirected because there's *no application* is actively using the port, because instead the ajp port, *8009* is being used to serve all the web request. 


 h2. Example URLs for jmx-console & tomcat status 

 * List of currently active serving web request: 
 <pre>http://<<ip address>>:9999/status?full=true</pre> 
 * Connection pool usage:  
 <pre> 
 http://<<ip address>>:9999/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.jca%3Aservice%3DManagedConnectionPool%2Cname%3D<<connection pool name>> 

 ip address - IP address of the server 
 connection pool name - the name of the connection pool 
 </pre> 
 * Thread Dump & memory usage: 
 <pre> 
 http://<<ip address>>:9999/jmx-console/HtmlAdaptor?action=inspectMBean&name=jboss.system%3Atype%3DServerInfo 
 </pre>