Know of any Java garbage collection log analysis tools?

JavaPerformanceLoggingGarbage Collection

Java Problem Overview


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.

Java Solutions


Solution 1 - Java

gcviewer does what you want.

Solution 2 - Java

IBM's GC toolkit does exactly what you ask.

https://www.ibm.com/developerworks/java/jdk/tools/gcmv/

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

Solution 3 - Java

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
(source: xebia.com)

Solution 4 - Java

I tried a online tool http://gceasy.io , it can read my sun jdk 1.8 gc log.

Solution 5 - Java

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.

Solution 6 - Java

The most powerful tool I've found to work with both IBM and Hotspot JVM logs and visualize them is IBM's PMAT: https://www.ibm.com/developerworks/mydeveloperworks/groups/service/html/communityview?communityUuid=22d56091-3a7b-4497-b36e-634b51838e11

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.

Solution 7 - Java

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.

Solution 8 - Java

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.

Solution 9 - Java

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 java.net : http://java.net/projects/printgcstats

Solution 10 - Java

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.

Solution 11 - Java

gchisto plugin for VisualVM doesn't work https://gchisto.dev.java.net/

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.

Solution 12 - Java

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionbraveterryView Question on Stackoverflow
Solution 1 - JavakohlermView Answer on Stackoverflow
Solution 2 - Javabajafresh4lifeView Answer on Stackoverflow
Solution 3 - JavafglezView Answer on Stackoverflow
Solution 4 - Javacraig_wu9View Answer on Stackoverflow
Solution 5 - Javafred-oView Answer on Stackoverflow
Solution 6 - JavaStian LundView Answer on Stackoverflow
Solution 7 - JavaNick FortescueView Answer on Stackoverflow
Solution 8 - JavaduffymoView Answer on Stackoverflow
Solution 9 - Javamnasce zewduView Answer on Stackoverflow
Solution 10 - JavaJohannes WeissView Answer on Stackoverflow
Solution 11 - Javauser504279View Answer on Stackoverflow
Solution 12 - JavaPetteri HView Answer on Stackoverflow