Remote JConsole and VisualGC

To connect visualgc remotely you need to be running jstatd on the server to be monitored.

Create a jstatd.all.policy containing:

grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};


Set and export the JAVA_HOME environment property and start jstatd with:

nohup jstatd -J-Djava.security.policy=jstatd.all.policy > jstatd.out 2>jstatd.err &


The default port is 1099.

Either get the pid from the server or start JConsole to get it.

In JConsole int Remote process enter server:port and a username and password if you set authentication to true below.

Ah yes, you will have to have started the Java process with the following environment (but should be using JConsole for monitoring and debugging anyway):

-Dcom.sun.management.jmxremote.port=11099
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false


When JConsole starts, click on the VM Summary tab.

This shows you many details about the JVM including vm arguments, classpath, pid, etc.

Execute visualgc as follows:

visualgc pid@server:jstatPort


Other posts

Comments

Popular posts from this blog

Sites, Newsletters, and Blogs

Oracle JDBC ReadTimeout QueryTimeout