This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Rolling log files for Garbage collection?

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Sheriff
Posts: 24654
58
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 RELEASE YOU! (for now .... ) Feel free to peruse this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!