Monitor Java programs to increase startup parameters
Java \
-djava.rmi.server.hostname=192.168.1.97 \
-dcom.sun.management.jmxremote \
-dcom.sun.management.jmxremote.port=1099 \
-dcom.sun.management.jmxremote.authenticate=false \
-dcom.sun.management.jmxremote.ssl=false \
-jar Imagescheck.jar > Image.log 2>&1 &
Because the startup parameters are too long, we can define the system environment variables to represent the last line increment in the/etc/profile
Export java_opts= '-djava.rmi.server.hostname=192.168.1.97-dcom.sun.management.jmxremote- Dcom.sun.management.jmxremote.port=1099-dcom.sun.management.jmxremote.authenticate=false- Dcom.sun.management.jmxremote.ssl=false '
Then source/etc/profile the file into effect.
At startup we can use Nohup java $JAVA _opts-jar imagescheck.jar > Image.log 2>&1 & This script.
JMX Port is 1099;
If you do not set the server hostname-djava.rmi.server.hostname then you may not be able to connect.
Enter the Jconsole command on the native command line to bring up the interface
Enter the host name in the remote process: port number
Jconsole Monitoring Remote Spring boot program