Enable Tomcat JMX

If you need to obtain server statistical data from Tomcat, you probably have to get it via Tomcat JMX. It’s pretty straight-forward to take a glance of what the current Tomcat server status with the JMX func by Tomcat.

Tomcat provides detail instruction here:https://tomcat.apache.org/tomcat-7.0-doc/monitoring.html#Enabling_JMX_Remote

Very simple.

Add parameter in setenv.sh to enable JMX.
(Assume we use port number 9999)


If we need authentication, change it to


Notice. The directory of jmxremote.access and jmxremote.password may need absolute path if Tomcat fails to locate the file.

Here we create jmxremote.access file

monitorRole readonly
controlRole readwrite

Create jmxremote.password file

monitorRole abc123
controlRole xyz789

The jmxremote.password file must be set to readonly mode.

chmod 400 /path-to-it/jmxremote.password


Leave a Reply

Your email address will not be published. Required fields are marked *

ERROR: si-captcha.php plugin says GD image support not detected in PHP!

Contact your web host and ask them why GD image support is not enabled for PHP.

ERROR: si-captcha.php plugin says imagepng function not detected in PHP!

Contact your web host and ask them why imagepng function is not enabled for PHP.