I saw the recommendation of this tool on the javaeye homepage today. It's good:
Javamelody can monitor Java or Java EE applications in QA and actual running Production Environments
Program Server. The following charts show the usage of Java memory and Java CPU, the number of user sessions, and the number of JDBC connections, and the number of HTTP requests, SQL requests, JSP pages, and business interface methods (ejb3, spring, and guice), average execution time, and error percentage. Charts can be viewed by day, week, month, year, or custom time period.
The configuration is as follows:
1. Download the zip package at http://code.google.com/p/javamelody/downloads/list.
2. decompress and copy javamelody. War to the Tomcat release directory.
3. Add the following content to the Monitored project web. xml:
Code
<Filter>
<Filter-Name> Monitoring </filter-Name>
<Filter-class> net. Bull. javamelody. monitoringfilter </filter-class>
</Filter>
<Filter-mapping>
<Filter-Name> Monitoring </filter-Name>
<URL-pattern>/* </url-pattern>
</Filter-mapping>
<Listener>
<Listener-class> net. Bull. javamelody. sessionlistener </listener-class>
</Listener>
so you can use, more detailed can refer to here:
http://liuyes.javaeye.com/blog/691752