• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

monitoring GC

 
Annekee Dufour
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have some applications running with java 1.4.2, and use all kinds of fashionable garbage collection monitoring options there.
But now I have this other application that really needs jdk 1.3.1, and all I can find is verbose:gc. It shows how much time the garbage collection takes and how much garbage gets collected, but it does not even give me a timestamp. There must be more! Anyone?
 
Jeffrey Spaulding
Ranch Hand
Posts: 149
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i don't know if this one
-Xloggc:/whereyoustoreyour/logs/gc.log
already exists in 1.3.x,
in 1.4.x it gives you something like


Bye,
J.
 
Annekee Dufour
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't exist, that's my problem!
 
Billybob Marshall
Ranch Hand
Posts: 202
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why in the world should your app care WHEN garbage collection occurs, or how frequently, or how much it collects at a time, etc etc etc? This should not be an application requirement.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could pipe the log through another process that added a timestamp to each line; here's one in Perl (don't laugh, I'm not much of a Perl hacker

This reads standard input and prints every line it reads preceded by a POSIX date string.
 
Annekee Dufour
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx Ernest.
BillyBob, I sometimes see full GCs that take 7 seconds. This is harming my response times (which need to be below 2 seconds). I want to see how often that occurs. I also want to know the percentage of time my system spends garbage collecting. Maybe some tuning is necessary, increase memory or change how it is divided between young space, eden etc, another kind of garbage collection.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic