Want to confirm heap size that tomcat is using

codecompleting picture codecompleting · Dec 21, 2011 · Viewed 38.6k times · Source

I'm on ubuntu, and I need to confirm the heap size setting is being used by tomcat.

How can I do that?

I tried jmap but that doesn't seem to be on the server, can I download it individually somehow?

Answer

Bahadır Yağan picture Bahadır Yağan · Feb 27, 2013

Check the process parameters for -Xmx256m using ps command:

bahadir@dev1:/$ ps -ef | grep java
tomcat6    804     1 13 15:29 ?        00:00:23 /usr/lib/jvm/java-6-openjdk/bin/java 
-Djava.util.logging.config.file=/var/lib/tomcat6/conf/logging.properties 
-Djava.awt.headless=true -Xmx256m -XX:+UseConcMarkSweepGC 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 
-Djava.endorsed.dirs=/usr/share/tomcat6/endorsed 
-classpath /usr/share/tomcat6/bin/bootstrap.jar 
-Dcatalina.base=/var/lib/tomcat6 
-Dcatalina.home=/usr/share/tomcat6 
-Djava.io.tmpdir=/tmp/tomcat6-tmp org.apache.catalina.startup.Bootstrap start