VisualVM uses Jstatd to remotely monitor the server

Source: Internet
Author: User

VisualVM uses Jstatd to remotely monitor the server

Jstat can display class loading, memory, garbage collection, JIT compilation and other data in local or remote JVM processes in real time. To display remote JVM information, you must enable RMI on the remote host. For details, see the following section.

1. Create the jstatd server authorization file jstatd. all. policy. The Code is as follows, and then place the file to the Java/bin directory.

Grant codebase "file: $ {java. home}/../lib/tools. jar "{

Permission java. security. AllPermission;

};

2. Switch to the java/bin directory and start the Jstatd server.

./Jstatd-J-Djava.security.policy = jstatd. all. policy

3. In case of port occupation problems, select another port when starting the jstatd server.

// Check whether the port is in use

Netstat-ano | grep-I 1099

// Specify other ports when starting the jstatd Server

Rmiregistry 2030 & jstatd-J-Djava.security.policy = jstatd. all. policy-p 2030

4. After the jstatd server is successfully started, the Jstatd server address is added to the VisualVM, and the connection succeeds automatically, and the server's CPU, memory, thread, and other information are obtained.

5. For details about Jstatd, click here.

This article permanently updates the link address:

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.