Thursday, November 21, 2013

How to monitor your tomee+ app running at eclipse indigo

It's so sad that Eclipse dropped its support to TPTP project, so it's not available for Indigo or June. MAT is not exactly something friendly. So, the easiest way to monitor the heap I've found was to use GCViewer. It's simple, it has a button to refresh the graph on every file change (it parses the garbage collector file and presents in a nice graph) and it really helps.

So, download the GCViewer fork (that will allow you to parse the most recent JVM gc files) and add these to your tomee server launch configuration parameters

-Xloggc:gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+HeapDumpOnOutOfMemoryError

Just notice that when the server shuts down, the gc file vanishes too.

I wonder why Eclipse can't integrate such a simple tool.

No comments:

Post a Comment