In the tomcat bin directory open Catalina.sh
And add an entry for
JAVA_OPTS
Java runtime options used when the "start", "stop", or "run" command is executed.
Set the param to (modify as per your requirement)
export CATALINA_OPTS="-Dcom.sun.management.jmxremote.port=9002 \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-Djava.rmi.server.hostname=10.2.106.100 \
-Xms12m -Xmx64m -XX:MaxPermSize=32m"
Here 9002 is the jmx port
Hostname is the ip of the tomcat server
The last line is where you set the jvm heap size
-Xms = initial
-Xmx = Maximum
Now go to you jdk/bin directory and open up a jconsole
Select the remote tab and provide the settings
Ip and port number , which in our case are 10.2.106.100 and 9002 respectively.
You are all set.
[ August 15, 2008: Message edited by: benjamin muktesh ]