Java Project performance Monitoring and Tuning tool---------------Javamelody

Source: Internet
Author: User
Tags cpu usage

Javamelody can monitor Java or Java EE application servers in a running environment. And graphically displays: Java memory and Java CPU usage, number of user sessions, number of JDBC connections, and number of executions of HTTP requests, SQL requests, JSP pages and Business interface methods (EJB3, Spring, Guice), average execution time, Percent of errors, and so on. Charts can be viewed by day, week, month, year, or custom time period.


The monitoring effect is shown at the end of this article.


Configuration mode:
1. Download Address: Http://code.google.com/p/javamelody/downloads/list
So far the latest version is 1.47.0, download address: http://code.google.com/p/javamelody/downloads/detail?name=javamelody-1.47.0.zip&can=2 &q=
2. After downloading can extract find Javamelody-1.47.0.jar and Jrobin-1.5.9.1.jar, reference to the project.

3. Configure filter in Web.xml:

[HTML]  View plain copy <filter>           <filter-name >monitoring</filter-name>           <filter-class >net.bull.javamelody.MonitoringFilter</filter-class>            <init-param>                <param-name>log</param-name>                <param-value>true</param-value>            </init-param>       </filter>        <filter-mapping>           < filter-name>monitoring</filter-name>           < url-pattern>/*</url-pattern>       </filter-mapping>        <listener>           <listener-class> net.bull.javamelody.sessionlistener</listener-class>       </listener >   4. Restart Project: Open Link: http://For example: http://127.0.0.1:8080/myproj/monitoring

at this point, the basic configuration is complete, with simple performance monitoring, and the following configuration is the integrated configuration of Javamelody and Struts2 and Spring3:


5.javamelody and STRUTS2 integrated when configured:

[HTML]   View plain copy <package name= "base  namespace="/" extends=" Struts-default ">           <result-types>                <result-type name= "JSON"  class= "Org.apache.struts2.json.JSONResult"  />            </result-types>           <interceptors >               <!--  javamelody -->               < Interceptor name= "Monitoring"  class= "Net.bull.javamelody.StrutsInterceptor"  />                 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.