1.jconsole Tool JDK's bin/directory with the tools. The effect is shown in Figure 1-1.
Figure 1-1 Jconsole
2.visual VM
The JDK's bin/directory has its own tools.
Heap dump can be used to parse programs, with a file suffix of. hprof.
The way to heap dump is shown in Figure 2-1
Figure 2-1 JVISUALVM Heap Dump 2.1 Connect to local JVM processes
Open the visual VM to see directly. 2.2 Connecting remote JVM processes
The JVM's startup parameters need to be added on the remote machine.
For example, on a machine (Windows) to view the B machine (Linux) on the J process C (Java process) situation. You need to add parameters at C Startup:
-djava.rmi.server.hostname=${b Machine IP}
-dcom.sun.management.jmxremote=true
- Dcom.sun.management.jmxremote.port=${port}
-dcom.sun.management.jmxremote.authenticate=false
- Dcom.sun.management.jmxremote.ssl=false
Then put-jar (or-CP) These subsequent parameters on the back. JDK does not have to do any setup. See figure 2-2 after success.
Figure 2-2 Remote View