Use JVISUALVM to remotely observe Java programs and JVISUALVM plugins [go]

Source: Internet
Author: User

JVISUALVM is the JDK's own tool for monitoring the health of the JVM, using JVISUALVM to view the operation of the JVM, the GC situation, the running of the thread, the condition of classes and instances in memory, and so on.

Using JVISUALVM to remotely observe the Java program, the original link: http://blog.iamzsx.me/show.html?id=394002

Sometimes, we may need to remotely view the operation of a Java program on a machine, for example, a memory leak may occur, but only in a particular environment. At this point we need to remotely observe some of the Java program's implementation. JVISUALVM provides a convenient interface to help us monitor Java programs.

The first way to introduce this is to use JMX for monitoring. This approach requires us to manually turn on the JMX remote function when we start the Java program. The way to open it is to start the Java program with the following command-line arguments:
-dcom.sun.management.jmxremote.port=<port>
-dcom.sun.management.jmxremote.ssl=false
-dcom.sun.management.jmxremote.authenticate=false

Here <port> is the port used by JXM remote. You can change to the port you want.

Suppose we want to start a Java program Foo.jar on this 10.2.3.4 machine. Then we can use the following method to start the program.
java-dcom.sun.management.jmxremote.port=40124
-dcom.sun.management.jmxremote.ssl=False
-dcom.sun.management.jmxremote.authenticate=false -jar Foo.jar

Here we set the port to 40124.

Next we open JVISUALVM, then right-click on the remote, fill in the server we want to monitor host:10.2.3.4, click OK.

  

Use JVISUALVM to remotely observe Java programs and JVISUALVM plugins [go]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.