Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

One of our production Tomcat boxes runs two webapps. One is ours, another is a black box app that our vendor supplied to "help" with our app.

We are, unfortunately bumping up against memory limits on our production box, and I'm working to add RAM and have Tomcat start with more memory available for the JVM. Before I do this, however, I'd like to see which of these two webapps is eating up all the RAM!

Is there an option within the built-in Tomcat manager that shows RAM usage by webapp? If not, is there a free solution available, somewhere, that offers this level of diagnostic availability?

If need be, I am open to writing my own lightweight webapp to do it, and have one running on the machine that watches the other two.

IVR Avenger

share|improve this question
up vote 1 down vote accepted

Take a look at Tcat Server from MuleSoft, it can provide you tons of information on memory utilization. You can use it with your existing Tomcat installation.

share|improve this answer

Try using JMX. Enabling this should be as simple as adding the following line to your startup script:


As you can see, there are options for encryption and authentication to satiate your local Manager of Paranoia.

You didn't mention what monitoring system you're using; you'll probably have to set that up to be able to talk JMX as well. Zabbix has Zapcat, Here's some OpenNMS instructions, and here's a Nagios plugin.

share|improve this answer

Unfortunately, I don't think there is any way to break down RAM usage by individual web application, even using JMX. However, just for this experiment, you could try running each web application in its own Tomcat instance. Then measure the memory usage of each separate JVM.

share|improve this answer

Have a look at lamdaprobe it's a small webapp that can even hook to JMX and give you lot of valuable infos:

beware that access to this app should be given only to administrators

share|improve this answer

Zenoss will let you watch the server running tomcat, the tomcat process and monitor it via JMX as well. There's a fair amount of documentation and it's open source.

share|improve this answer

You can break down the memory inside the server by classes and by references, but it is a bit technical. Just take a heap dump at some point in time with jmap or jconsole or jvisualvm or -XX:+HeapDumpOnOutOfMemoryError. Then open it with Eclipse MAT or JHat.

Then if you want more monitoring : (memory charts and breakdown by classes included)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.