This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: Monitoring Heap Usage -- How?
- From: "Boehm, Hans" <hans dot boehm at hp dot com>
- To: "Alan Eliasen" <eliasen at mindspring dot com>, "Ted Fines" <fines at macalester dot edu>
- Cc: <java at gcc dot gnu dot org>
- Date: Tue, 23 May 2006 16:11:02 -0700
- Subject: RE: Monitoring Heap Usage -- How?
The garbage collector also checks for some environment variables that
cause it to become more verbose. Try setting GC_PRINT_STATS and/or
GC_DUMP_REGULARLY. (The latter may be more verbose than you like; it
produces something like a dozen characters per page in the heap.) See
README.environment in GC the source.
Disclaimers: I'm not sure whether or not this output ends up anywhere
reasonable in your environment, whether it includes what you want, or
whether it was even supported in that old a version. David Daney's
suggestion is bound to produce more useful information with more work.
Hans
> -----Original Message-----
> From: java-owner@gcc.gnu.org [mailto:java-owner@gcc.gnu.org]
> On Behalf Of Alan Eliasen
> Sent: Tuesday, May 23, 2006 3:46 PM
> To: Ted Fines
> Cc: java@gcc.gnu.org
> Subject: Re: Monitoring Heap Usage -- How?
>
> Ted Fines wrote:
> > Hi,
> >
> > We're using OCS (Oracle Collaboration Suite), which uses
> GNU's java
> >3.2.3. I want to monitor the Heap Usage for a JVM, and despite many
> >searches for info on this on Google, I haven't been able to
> find the
> >command to do it. OCS has an 'Enterprise Manager' web app which
> >displays this ever-changing value on it, but it's a
> compiled app and I
> >can't see how they do it.
>
> Do the methods in java.lang.Runtime work for your
> purposes? Such as totalMemory()? They may not give all of
> the information that you're looking for, and in fact may or
> may not work on GCJ. I've never tested them.
>
> --
> Alan Eliasen | "When trouble is solved before it
> eliasen@mindspring.com | forms, who calls that clever?"
> http://futureboy.us/ | --Sun Tzu
>