JmxMonitor is an application designed to monitor MBean attributes published on a remote JVM using the JMX API.
JmxMonitor provides two main functionalities via its command-line interface (CLI):
- Connect to a Remote JMX Server: Access and retrieve MBeans from a remote JMX server.
- Graphical User Interface (GUI): Display a chart illustrating Heap Memory Usage.
An example application called "JmxServer" is provided in order to test JmxMonitor.
This application is developed using Java 11, Apache Maven, and Visual Studio Code.
To compile the main JmxMonitor application, use the following command:
mvn package
You can run the JmxMonitor application with:
mvn exec:java -Dexec.mainClass=com.domen5.jmxmonitor.Main
The JmxServer example application, which includes a single MBean named Count
, can be compiled with:
mvn package
To run JmxServer, use one of the following commands:
java -cp target/JmxServer-1.0-SNAPSHOT.jar -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false com.domen5.jmxserver.Main
Alternatively, you can run it from the target/classes
directory with:
java -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false com.domen5.jmxserver.Main