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.
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: java garbage collection
0 Comments:
Post a Comment
<< Home