Quick Start Guide to Using VisualVM to Monitor JVMs On Remote Hosts.

VisualVM is a tool used to monitor Java Virtual Machines and provide a lightweight profiling capability. From time to time, developers may need to monitor JVMs running at a remote host. VisualVM can be used in conjunction with jstatd to accomplish this task.

jstatd uses the Java remote object registry. This diagram shows the basic architecture at a high-level:


Step 1: get jstatd running.

If jstatd is not running,  create a file called jstatd.all.policy with the following contents:

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

Start jstatd as follows:

nohup jstatd -J-Djava.security.policy=/path/to/your/jstatd.all.policy &

Step 2: configure VisualVM.

Add the remote host to the VisualVM configuration:


The JVMs on the remote host should show up now:



About Terry Gardner

Terry Gardner was a leading directory services architect with experience with many large scale directory services installations and messaging server installations, and was a Subject Matter Expert in the field of Directory Services and Solaris (operating system) performance. Mr. Gardner also participated in the open-source software community. Mr. Gardner passed away in December, 2013.
This entry was posted in Java and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s