aspose file tools*
The moose likes Performance and the fly likes Rolling log files for Garbage collection? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Rolling log files for Garbage collection?" Watch "Rolling log files for Garbage collection?" New topic
Author

Rolling log files for Garbage collection?

Rajiv Shr
Ranch Hand

Joined: Aug 11, 2010
Posts: 37
Hi,

I am using Sun JVM garbage collection logging to find out the performance of my application. Below are the parameters that I have lined up in my apache tomcat server's setenv.sh file


export CATALINA_OPTS="-server -Xms512m -Xmx1536m -XX:MaxPermSize=150m -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintTenuringDistribution -XX:+PrintHeapAtGC -Xloggc:/var/tom8080/logs/gclog.txt"

The problem we are facing is that the gclog.txt is growing huge and eating up 50% of the space on the server. And still growing.

Is there a way to roll over that file and archive it in an automated fashion, similar to how you would do it for a log4j controlled file ?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

What I would do at this point would be to say "Okay, I have many megabytes of GC data. That should be plenty for me to analyze. So I will turn off the GC logging in the server for now."
Rajiv Shr
Ranch Hand

Joined: Aug 11, 2010
Posts: 37
But, our application is running 24x7. If we turn GC off at some point, and if there is any issue any time after that, then we will not be able to analyze.

So, Sun does not provide any way of rolling over and archiving the gc log file?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Rolling log files for Garbage collection?