Use jvisualvm to connect to a remote JVM to monitor system running performance parameters.
Role: JVM and monitoring applications run on different servers, reducing the burden on applications, especially when heapdupm is used, applications are often overloaded.
1. Configure JVM startup parameters for Tomcat on 10.87.40.141. Add the following parameters to Tomcat Catalina. BAT:
SEt java_opts =-DCOM. sun. management. jmxremote-DCOM. sun. management. jmxremote. port = & quot; 9004 & quot;-DCOM. sun. management. jmxremote. authenticate = "false"-DCOM. sun. management. jmxremote. SSL = "false"
-DCOM. Sun. Management. jmxremote. Port = 9004 specifies the proxy port for JMX startup. This port is the port to be connected by visual VM.
-DCOM. Sun. Management. jmxremote. SSL = "false" specifies whether JMX enables SSL.
-DCOM. Sun. Management. jmxremote. Authenticate = 9004 specifies whether JMX is enabled.
Authentication (user name and password authentication are required)
2. Run jvisualvm. Select the remote node on the left and right-click the add remote host dialog box.
3. Enter the remote Tomcat Host IP address and click OK.
4. added the added node under the remote node on the left. Right-click the node 10.87.40.141 and choose add JMX connetcion... from the shortcut menu ..".
5. In the displayed dialog box, enter the host IP address and port of the tomcat to be connected. The port is port 9004 set in Catalina. bat. Click OK.
6. Add a JMX node to the Tree node on the left. Double-click the node or right-click the node to pop up the menu and click "open ",
7. You can remotely monitor Tomcat usage.