In
this guide we will demonstrate how to remotely monitor tomcat jvm via a remote jmx connection with Jconsole.
For enabling remote monitoring follow below steps:
We will cover both of the above steps in detail in the following section.
Enabling JMX Port on tomcat running on linux servers
Create a setenv.sh(if not exists) file in tomcat bin folder, and put the following values :
Replace braces with appropriate values
For Example
Enabling JMX Port on tomcat running on windows servers
Follow steps as mentioned in linux section, just name of the file will be "setenv.bat"
Enabling JMX Port on tomcat running on windows servers as a service
1. Open configure tomcat from start menu
2, In tomcat properties >> Java tab add the four lines as shown below
Open Jconsole and connect via jmx
Jconsole is shipped with any JDK installation. Go to jdk bin folder and open jconsole
Add ip address of remote host and jmx port number and connect
this guide we will demonstrate how to remotely monitor tomcat jvm via a remote jmx connection with Jconsole.
For enabling remote monitoring follow below steps:
- Enable JMX port on remote tomcat.
- Open Jconsole and connect
We will cover both of the above steps in detail in the following section.
Enabling JMX Port on tomcat running on linux servers
Create a setenv.sh(if not exists) file in tomcat bin folder, and put the following values :
Code:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port={port to access}
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname={optional, allow what ip to access this Tomcat}
Replace braces with appropriate values
For Example
Code:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9090
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
Enabling JMX Port on tomcat running on windows servers
Follow steps as mentioned in linux section, just name of the file will be "setenv.bat"
Enabling JMX Port on tomcat running on windows servers as a service
1. Open configure tomcat from start menu
2, In tomcat properties >> Java tab add the four lines as shown below
Code:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9090
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
Open Jconsole and connect via jmx
Jconsole is shipped with any JDK installation. Go to jdk bin folder and open jconsole
Add ip address of remote host and jmx port number and connect