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" {

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

nohup jstatd > 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):

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


Popular posts from this blog

Oracle JDBC ReadTimeout QueryTimeout

ActiveMQ https

Generically load enum mapping via properties file