I'm wondering what is the best way to visually analyse and monitor java gc.log files.
GCViewer is the most interesting tool I've found so far, but I'm wondering if there is anything better or a good solution for monitoring multiple remote gc.log files.
I think the most effective way for analyzing the garbage collector log is by looking at the output itself. Our production server all run using the Concurrent Mark Sweep Collector and I have the log running with the options -Xloggc:$GCLOGFILE -XX:+PrintGCDetails and if the environment runs into problems I
I usually also look at the thread list and check the amount of cpu time the Garbage Collector consumes. I do this by running top with the -p <java-pid> Parameter and press "H" afterwards, with this you get to see the pids which consume the most cpu time. This then can be matched to a Thread Dump to see if gc threads are the most time consuming threads. Every thread has a pid displayed in the thread dump, which is in hex, this can be matched to the pids in top.
It is quite important to see the cpu times the GC consumes and match this to your log output. I tried the GCViewer several times but never really got useful hints from the visual display of the GC-Data.
You can use the jconsole tool which is included into the JDK. Or when you run a java application, you can use the parameter "-verbose:gc" .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With