For java, you'll do something like this:

Runtime runtime = Runtime.getRuntime();
long maxMemory = runtime.maxMemory();
long totalMemory = runtime.totalMemory();
long freeMemory = runtime.freeMemory();

Maximum memory is the total memory the JVM will allocate. 
Total Memory is the total amount of memory current allocated.
Free memory is the amount of memory free of the total currently
allocated.

-----Original Message-----
From: laredotornado [mailto:laredotorn...@gmail.com] 
Sent: Wednesday, August 18, 2010 1:42 PM
To: users@tomcat.apache.org
Subject: How can i tell how much of allocated heap is being used?


Hi,

I'm using Tomcat 6.0.26, Java 1.6 on Linux kernel 2.6.18-164.11.1.el5.
I'm
trying to figure out if there if we can figure out how much of our
allocated
heap memory is actually being used.  Grateful for any thoughts you might
have, - Dave

-- 
View this message in context:
http://old.nabble.com/How-can-i-tell-how-much-of-allocated-heap-is-being
-used--tp29474695p29474695.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to