Friday, October 18, 2019

use VisualVM to monitor JAVA application

Run the JAVA application with the following options.

java8 -jar 
-Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.port=8662 
-Dcom.sun.management.jmxremote.rmi.port=8662 
-Dcom.sun.management.jmxremote.local.only=false 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false 
-Xms32m 
-Xmx128m 
TestVisualVM.jar

Now, connect the remote JMX session in 8662 port in VisualVM to monitor application.

No comments:

Post a Comment