• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

monitoring GC

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It doesn't exist, that's my problem!
 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
grapes are vegan food pellets. Eat this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic