Plugin install
tools->plugin->Available Plugin There will be plug-ins worth installing, such as VisualGC
Plugin Lists: https://visualvm.dev.java.net/plugins.html
Note: The port configuration provided above is a bit cumbersome, so why not just do it like this.
To use VisualGC you must start the jstatd agent on the remote machine, otherwise it will show “not supported for this jvm” error.
And there is a permission problem when starting jstatd, you need to make the following changes.
[root@xxx-01 ~]# java -version
java version “1.7.0_55”
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
[root@xxx-01 ~]# jstatd
Could not create remote object
access denied (“java.util.PropertyPermission” “java.rmi.server.ignoreSubClasses” “write”)
java.security.AccessControlException: access denied (“java.util.PropertyPermission” “java.rmi.server.ignoreSubClasses” “write”)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
at java.security.AccessController.checkPermission(AccessController.java:559)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.System.setProperty(System.java:783)
at sun.tools.jstatd.Jstatd.main(Jstatd.java:139)
[root@xxx-01 ~]# cd /usr/java/jdk1.7.0_55
[root@xxx-01 ~]# vi /usr/java/jdk1.7.0_55/jstatd.all.policy
grant codebase “file:${JAVA_HOME}/lib/tools.jar” {
permission java.security.AllPermission;
};
[root@xxx-01 jdk1.7.0_55]# jstatd -J-Djava.security.policy=/usr/java/jdk1.7.0_55/jstatd.all.policy &
Then start the jstatd command in background mode
e.g: