jmx动态开启&关闭
jcmd ${pid} ManagementAgent.start jmxremote.port=9999 jmxremote.ssl=false jmxremote.authenticate=false
jcmd ${pid} ManagementAgent.stop
cat jmxremote.access
admin readwrite
cat jmxremote.password
admin admin123456
chmod 600 jmxremote.*
jcmd ${pid} ManagementAgent.start jmxremote.port=9999 jmxremote.ssl=false jmxremote.authenticate=true jmxremote.access.file=/data/server/test/logic6/jmxremote.access jmxremote.password.file=/data/server/test/logic6/jmxremote.password
jcmd ${pid} ManagementAgent.stop
- 测试
可以通过jvisualvm.exe去连接查看jmx监控信息