Is there a way to monitor CPU and memory consumption of an individual web application on a Tomcat
server?
I have Tomcat
opening all the web applications under its JVM, so I only see one JVM and cannot monitor each web-app by itself.
The web-apps are sealed WAR files and I cannot tamper with the Java code either.
Java Management Extensions, or JMX, is a Java technology designed for remote administration and monitoring of Java components. All versions of Tomcat 5. x or later natively support the JMX protocol.
There are many ways to monitor an Apache Tomcat application server. Java Management Extension (JMX) interface can be used to collect metrics about the server. Application logs can be monitored to determine errors that happen. The application process can be tracked to determine times when the server restarted.
By default, Tomcat sets maxThreads to 200, which represents the maximum number of threads allowed to run at any given time. You can also specify values for the following parameters: minSpareThreads : the minimum number of threads that should be running at all times.
Looks like the official answer (to a very similar question/suggestion) is to run multiple Tomcat instances.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With