visualgc | jps | jvmstat | Java Garbage Collection

The visualgc tool attaches to an instrumented HotSpot JVM and collects and graphically displays garbage collection, class loader, and HotSpot compiler performance data.



Add -XX:+UsePerfData flag   – on system to be monitored.

(Over RMI)

Do following on system from where you do monitoring:-

Download jvmstat from here

cd /root

unzip jvmstat-***.zip

add following to /etc/profile

export JVMSTAT_HOME=/root/ jvmstat

export JAVA_HOME=/usr/local/jdk1.6


Now on server to be monitored do following:-

vi /root/jstatd.policy and add following :-

grant codebase "file:${java.home}/../lib/tools.jar" {

then run following on system beeing monitored :

Now on monitoring server run following:
Check vmid using jps

17869 Bootstrap
17876 Jstatd
17877 Jps

then run visualgc

#visualgc 17869@
 and enjoy the graphs ... :)

with JDK 6 Update 23 define temp dir

jstatd -J-Djava.rmi.server.logCalls=true