how to check heap size allocated for jvm by linux

Amit picture Amit · Feb 13, 2012 · Viewed 75.8k times · Source

I have apache-tomcat as my web server. I want to check what heap size is allocated for jvm by linux. Also from where, I can modify it.

Answer

Derick picture Derick · Apr 23, 2014

A simple way on Linux is to run the following:

ps -ef |grep tomcat

Look for the starting and maximum JVM memory:

-Xms1024m -Xmx4096m

In this case it is allocating 1G on startup and the Maximum is 4G.