1748249 Members
3688 Online
108760 Solutions
New Discussion юеВ

heap size of java in HP

 
Narasimham
Advisor

heap size of java in HP

I would like to know which parameter shows the current heap size of a java process (in glance??). Are there any Metrics which i can use in Measureware data collection.

Thanks
Narasimham
4 REPLIES 4
Stefan Farrelly
Honored Contributor

Re: heap size of java in HP

I think you need to use ps -x | grep java
(in 11.11) which should show the heap size specified when java was started. Eg, on one of my servers;

401 R 117 19698 19697 0 152 20 6ab2c400 5647 - ? 3:23 /usr/bin/java/bin/../bin/PA_RISC2.0/native_threads/java -Xmx256M -Xms128M -XX:MaxPermSize=128M -XX:NewSize=64M -XX:MaxNewSize=128M

You can see the various memory size limits put on java when it started.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Narasimham
Advisor

Re: heap size of java in HP

I am actually interested in finding the heap utilization( not the value we define at the startup) when it is processing.

Thanks
Narasimham
Bill Hassell
Honored Contributor

Re: heap size of java in HP

Use the process detail screen in Glance by typing s while Glance in running. It wil ask for a PID and then report (in great detail) the process state including memory usage and detailed file handle information. To see all the 1-char commands in Glance, just type ? while Glance is running.


Bill Hassell, sysadmin
Mike Stroyan
Honored Contributor

Re: heap size of java in HP

You can ask java to report heap usage.
It will log a lot of details.
Run
java -Xverbosegc:help
to get a summary of the options and format.

If the process is already started, you could
use glance's memory regions report. Look
for the "MEMMAP/Priv" line with the biggest VSS size.
That one would typically be the java heap.