JMX Full name Java Management Extensions, which provides management extensions for Java applications. Introduced in Java 5
Concept
Name |
Description |
Mbean |
All called managed beans, you can implement an Mbean to provide management content for JMX |
MBean Server (also known as JMX Agent) |
Provides centralized enrollment management Mbean capability to allow remote operation of Mbean via his agent |
JMX Connectors |
Allow remote access by implementing different communication protocols |
Jconsole |
A JMX graphics client that runs user access to local or remote JMX, which is included by default in the Java SDK tools |
Referering Java Opts
Starting Java can give the JVM machine some parameters, such as setting the size of the running memory stack. Here is a list of some relevant parameters about JMX
Name of parameter |
type |
Description |
-dcom.sun.management.jmxremote |
Boolean |
Whether remote JMX access is supported, by default True |
-dcom.sun.management.jmxremote.port |
Numerical |
Monitoring port number for remote access |
-dcom.sun.management.jmxremote.authenticate |
Boolean |
If you need to turn on user authentication, turn on by default |
-dcom.sun.management.jmxremote.ssl |
Boolean |
If SSL encryption is turned on for the connection, it is turned on by default |
-dcom.sun.management.jmxremote.access.file |
Path |
The path to the file that is authorized to access the user's permissions, the default pathJRE_HOME/lib/management/jmxremote.access |
-dcom.sun.management.jmxremote. Password.file |
Path |
Set the user name and password of the access user, the default pathJRE_HOME/lib/management/ jmxremote.password |
For example, you need to start a springboot program that is resident in the background (such as App.jar), how to open a JMX that supports remote access, and you can try the following command
Java---dcom.sun.management.jmxremote.port=- dcom.sun.management.jmxremote.authenticate=-dcom.sun.management.jmxremote.ssl=false
For the parameters related to JMX you configure this enough, you can use the Jconsole connection,
The JDK's own monitoring tools are: 1, jconsole2, JVISUALVM
Jmx-java Management Extensions