Jstat can display real-time data such as class loading, memory, garbage Collection, JIT compilation, and so on in a local or remote JVM process. If you want to display remote JVM information, you need the remote host to open RMI support, see below for details.
1. CreateJSTATD Server Authorization fileJstatd.all.policy, the code is as follows, and then the file is placed in 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
3. If there is a problem with port occupancy, select a different port when you start the JSTATD server.
To see if the port is occupied
Netstat-ano | Grep-i 1099
Specify a different port when starting the JSTATD server
Rmiregistry 2030 & Jstatd-j-djava.security.policy=jstatd.all.policy-p 2030 |
4. After the JSTATD server starts successfully, the VISUALVM adds the JSTATD server address, it will automatically connect successfully and obtain the server's CPU, memory, thread and other information.
5. For more information on JSTATD, please click here .
This article is from the "This person's IT World" blog, be sure to keep this source http://favccxx.blog.51cto.com/2890523/1755299
VISUALVM using JSTATD remote monitoring Server