Jmx Tomcat using Jconsole

Apache Tomcat

Below steps can be followed to JMX tomcat using a jconsole remote connection.
1.    Login to the server where memory growth is found

2.    Navidate to the ‘CATALINA_HOME/bin’ location

3.    Open ‘catalina.sh’ and add following properties at the starting of the catalina.sh script

CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=<PortNumber> -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -XX:+HeapDumpOnOutOfMemoryError -Djava.rmi.server.hostname=<ServerName>"
export CATALINA_OPTS;

NOTES:
PortNumber = Any port number which is not used (use netstat -a command to identify used port numbers)
ServerName = Name of the host on which tomcat is running (UBS distributed server name where memory growth is found)

4.    Restart tomcat services

CATALINA_HOME/bin/shutdown.sh
CATALINA_HOME/bin/startup.sh

5.    Following steps can be run from any system where JDK is available (any desktop machine)

a.    Navigate to the JAVA_HOME/bin location from command prompt
b.    Type ‘jconsole’ and enter (Jconsole window opens)
c.    Select ‘Remote Process’
d.    Enter ServerName and PortNumber in following format (use same details from step1)
<ServerName>:<PortNumber>
e.    Enter Server Username and password
f.    Click on Connect button
g.    Capture Memory details and VM Summary details

In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.

Leave a Reply