Monitoring Heap Usage -- How?

Alan Eliasen eliasen@mindspring.com
Tue May 23 22:45:00 GMT 2006


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



More information about the Java mailing list