configure visualvm to monitor service

PHOTO EMBED

Thu Apr 20 2023 08:19:05 GMT+0000 (Coordinated Universal Time)

Saved by @chienbui #commandline

 -"Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=192.168.59.99"


Ex: 
pkill -f -9 vn.vtcc.service.NERAPI
#nohup java -cp "*" service $1 &
#nohup java -Dcom.sun.management.jmxremote.port=8991 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Xms1024m -Xmx1024m -cp "*" vn.vtcc.service.NERAPI $1 &
java \
 -Dcom.sun.management.jmxremote \
 -Dcom.sun.management.jmxremote.port=port \
 -Dcom.sun.management.jmxremote.rmi.port=port \
 -Dcom.sun.management.jmxremote.local.only=false \
 -Dcom.sun.management.jmxremote.authenticate=false \
 -Dcom.sun.management.jmxremote.ssl=false \
 -Djava.rmi.server.hostname=host\
 -cp "*" service $1 &
content_copyCOPY

https://stackoverflow.com/questions/30069643/remote-monitoring-with-visualvm-and-jmx