Command to be executed in solaris machine to know the existing heap size

Hi,I want to know the command to get the existing heap size of JVM. Java version is 1.5 and runs in solaris machine.ThanksRegards,Nanda
[170 byte] By [Nandakumar_sa] at [2007-11-26 21:01:47]
# 1

Hi,

one way to do this would be to run "jstat -gc <pid>" where <pid> is the PID of your JVM. jstat is part of the JDK >= 1.5, located in the bin directory. This will give you several columns with the current sizes of all generations of the JVM. The last character "U" always indicates the current usage, "C" the capacity. The current "heap capacity" (which can be adjusted with -Xms and -Xmx) is the sum of S0C, S1C, EC and OC.

Nick.

nicolasmichaela at 2007-7-10 2:33:39 > top of Java-index,Java HotSpot Virtual Machine,Specifications...
# 2
jmap -heap <pid> might be useful too.
alan.batemana at 2007-7-10 2:33:39 > top of Java-index,Java HotSpot Virtual Machine,Specifications...