Using VerboseGC will log garbage collection for you (includes both partial and full GCÂs). Use the following java option on the command when starting the JVM:
-verbose:gc ÂXloggc:/var/appl/logs/GC.log
Where it is possible to read the GC logs in raw format, using JMeter or equivalent application (VisualGC is another) is MUCH easier and less cryptic.
Java 6 has the following tools in the JVM:
Jhat (java heap analysis tool) Â Insufficient memory errors
Jconsole, jstat, jmap  Growing use of memory, frequent garbage collection, class with high growth rate, OutOfMemoryError
Jconsole  deadlocks
Jconsole or jhat  objects pending for finalization
Jconsole with jtop  looping threads (CPU time increases continuously)
Jconsole  high lock contention