.comment-link {margin-left:.6em;}

IntTech

Sunday, November 16, 2008

Garbage Collection Logging Options for Java

It is very hard to find all of the options for garbage collection options for Java. One of the best pages I have found is this one at Sun. But even it isn't complete. So here are the basic options I have learned about listed all in one location.

First you probably want the GC logs to go to its own file instead of mixed in with other things going to standard out, using the -Xloggc: option. Then you can use the following options to define the details logged.






-Xloggc:<file> log GC status to a file
-XX:+PrintGC Print messages at garbage collection.
-XX:+PrintGCDetails Print more details at garbage collection. (Introduced in 1.4.0.)
-XX:+PrintGCTimeStamps Print timestamps at garbage collection. (Introduced in 1.4.0.)
-XX:+PrintGCApplicationConcurrentTime The amount of time the applications runs between collection pauses
-XX:+PrintGCApplicationStoppedTime Amount of time in collection pauses
-XX:+PrintHeapAtGC Print Heap at GC

Labels:

Bookmark and Share

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home


Google