我本机安装了VisualVM,可以监控本机的Java应用。但是不清楚怎么配置参数去监考服务器的Java应用。
黄舟2017-04-18 09:06:02
Modify the remote machine JRE configuration file:
1. Enter the $JAVA_HOMEjrelibmanagement directory
2. Rename jmxremote.password.template to jmxremote.password
3. Open jmxremote.password and remove the comments of monitorRole QED and controlRole R&D
4. Modify the configuration file of the monitored program, such as tomcat : Open $TOMCAT_HOMEbincatalina.sh and add
JAVA_OPTS="$JAVA_OPTS -Djava.rmi.server.hostname=这里是服务器IP
-Dcom.sun.management.jmxremote.port=1099自定义一个端口
-Dcom.sun.management.jmxremote.ssl=false
Dcom.sun.management.jmxremote.authenticate=false"
5. Open VisualMV, click Remote, enter the server IP as the host name, click advanced settings to set the port, right-click the IP you just configured, select the JMX connection method, enter the port again after the IP, and click OK. .
PHPz2017-04-18 09:06:02
Recommend a remote java diagnostic tool
Using documentation
https://github.com/oldmanpushcart/greys-anatomy/wiki/greys-pdf