performance – Know of any Java garbage collection log analysis tools?-ThrowExceptions

Exception or error:

I’m looking for a tool or a script that will take the console log from my web app, parse out the garbage collection information and display it in a meaningful way.

I’m starting up on a Sun Java 1.4.2 JVM with the following flags:

-verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails

The log output looks like this:

54.736: [Full GC 54.737: [Tenured: 172798K->18092K(174784K), 2.3792658 secs] 257598K->18092K(259584K), [Perm : 20476K->20476K(20480K)], 2.4715398 secs]

Making sense of a few hundred of these kinds of log entries would be much easier if I had a tool that would visually graph garbage collection trends.

How to solve:

IBM’s GC toolkit does exactly what you ask.

I’m not sure if it’s compatible with GC logs from Sun’s JVM though.


gcviewer does what you want.


I think some people are adding Java probes which don’t really parse garbage collection logs as the question states…

I’ve tried others (gcviewer, gchisto, IBM’s) and the best tool I found for analyzing GC logs is HPjmeter

It is mainly for HP-UX JVMs, but it also usually works with Sun JVMs and does a great job.

alt text


I tried a online tool , it can read my sun jdk 1.8 gc log.


Even better than jconsole is visualvm, which is developed and distributed freely by Sun. It has a GC analyzing plugin called gchisto which might help you.

Edit: Sorry, I didn’t see your JDK 1.4.2 requirement. In that case visualvm won’t help you, alas.


The most powerful tool I’ve found to work with both IBM and Hotspot JVM logs and visualize them is IBM’s PMAT:

I find it both faster and gives more details than the tool in IBM Support Assistant.
It is being continually updated, lastly July’12.

However seems to have some problems parsing logs with policy CMS but hopefully that can be fixed.

PrintGCStats is pretty good too, and gives good statistics, but not for visualization over time, that needs some work.


I use YourKit java profiler, which lets you measure this sort of thing, and much more, but using it’s own format rather than analysing the log. It can do more under Java 5, but should work under 1.4.


Try VisualGC from Sun. There are JDK 4 and 5 versions that give you a nice visual of what’s going on in the eden, generational, and perm spaces. You need to add a JAR and get a PID and Bob’s your uncle.


A few years ago, John Coomes (Hotspot GC group) had released PrintGCStats, an awk script to “summarize statistics about garbage collection, in particular gc pause time totals, averages, maximum and standard deviations.”. A copy of the script is hosted on :


jconsole can help you a lot, but I think it’s Java 5 and later only. Once I heard someone of SUN speaking at our university and he said that Java 6’s garbage collector is A LOT better than the old ones which needed complicated tuning nearly all the time for big applications. Java 6 GC seems to scale a lot better on SMPs.


gchisto plugin for VisualVM doesn’t work

I have a file with all details of printgc for jdk1.6 but couldn’t find a tool to read that.
Previously with jdk1.5 we used HPjmeter it worked fine, but now with jdk1.6 it doesn’t

Tried following: IBM Pattern Modeling and Analysis Tool for Java Garbage Collector — it doesn’t recognizes the file. GCCollector doesn’t work, it keep on reading file for analysis.


How about trying out some profiling tool like JProbe Freeware (Eclipse plug-in).

Leave a Reply

Your email address will not be published. Required fields are marked *