Is it possible to do a rolling of garbage collector logs in Sun JVM?
Currently I generate logs using:
-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:
If you can't upgrade your java version to use the new flags for rotating the gc log then you could specify a different gc file each time the application starts:
JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=256m -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:/path/to/log/dir/gc.log-"`date +%Y-%m-%d-%H-%M`
When the setenv is referenced, usually at startup or shutdown, it will reference a different log file. In unix this can be used as a method for 'rotating' the log.