问题
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.
回答1:
Looks like the official answer (to a very similar question/suggestion) is to run multiple Tomcat instances.
回答2:
What do you want to monitor in web application? Servlets, ejbs....? If you pass corresponding objectname string as part of your jmx query, it will list all servlets from all applications hosted on the jvm. This way you can monitor individual application on that jvm.
来源:https://stackoverflow.com/questions/8629726/howto-monitor-several-web-applications-with-jmx-on-a-tomcat-server