`
kavy
  • 浏览: 891451 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Monitoring the Performance of Your Tomcat Application Server Using JavaMelody

 
阅读更多

Javamelody is an opensource (LGPL) application to monitor Java or Java EE application servers in QA and production environments.

JavaMelody is mainly based on statistics of requests and on evolution charts.

(Extract from the Javamelody home page)

  • It allows to improve applications in QA and production
  • Give facts about the average response times and number of executions
  • Make decisions when trends are bad, before problems become too serious
  • Optimize based on the more limiting response times
  • Find the root causes of response times
  • Verify the real improvement after optimization

It includes summary charts showing the evolution over time of the following indicators:

  • Number of executions, mean execution times and percentage of errors of http requests, sql requests, jsp pages or methods of business façades (if EJB3, Spring or Guice)
  • Java memory
  • Java CPU
  • Number of user sessions
  • Number of jdbc connections

These charts can be viewed on the current day, week, month, year or custom period.
You can even execute garbage collection to free resources, or view / invalidate http sessions.

Setting up Javamelody on your server

*Step 1: *
Download the javamelody-1.36.0.zip zip file.
Now, unzip, and add copy the files javamelody.jar and jrobin-x.jar into the in the lib directory of Tomcat.

*Step 2: *
Add the following lines in the web.xml file of the conf directory of Tomcat (and not in the WEB-INF/web.xml files of the webapps).

web.xml.snippet
<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>

Once this is done, all you need to do is restart the application. Once the application is up, navigate to http://<host>/<context>/monitoring url to view a whole set of interesting data.

The full instrcutions are available here.

What does the Javamelody monitoring page look like?

Attached below is a screenshot of my Javamelody monitoring page. Note that this screenshot is of a development environment with no data and just a single user.

Disclaimer : I was only able to try out Javamelody on a development environment. Therefore, implementers are advised to test out Javamelody on a trial environment before moving it into the production server/s.

分享到:
评论

相关推荐

    JavaMelody 监测java或javaEE应用服务器

    3. 启动Tomcat服务器,然后在你的应用URL后面添加`/monitoring`路径,例如`http://yourapp.com/monitoring`,就可以访问到JavaMelody的监控界面。 4. 在监控界面上,你可以看到各种图表和统计数据,包括HTTP请求、...

    Java.EE.7.Performance.Tuning.and.Optimization.178217642X

    Understand the basic aspects of the Java virtual machine and application server performance tuning Design guidelines for better enterprise application performance Discover different Java optimization ...

    javamelody与spring集成测试入门例子

    完成以上步骤后,当项目运行起来,通过浏览器访问`http://your-app-url/monitoring`,就能看到JavaMelody提供的监控界面,其中包括了CPU使用率、内存使用情况、数据库查询统计、异常日志等丰富的信息。 在实际应用...

    javamelody资料包

    JavaMelody是一款强大的Java应用程序性能监控工具,它可以帮助开发者实时监测和分析应用的运行状态,包括请求量、响应时间、内存使用、线程状态、数据库查询等关键指标。本资料包包含了搭建JavaMelody监控所需的全部...

    JavaMelody应用监控使用指南

    JavaMelody支持多种应用服务器,包括Tomcat 5.5、6、7、GlassFish v2和v3、JBoss 4、5、6、7、Jonas 4和5、Jetty 6和7以及WebLogic 9、10、11。对于不支持的服务器,可能需要安装额外的插件,具体信息可以在官方User...

    Java EE 8 High Performance

    What you will learnIdentify performance bottlenecks in an applicationLocate application hotspots using performance toolsUnderstand the work done under the hood by EE containers and its impact on ...

    vSphere Monitoring and Performance (vSphere 5.5, vCenter Server

    vSphere Monitoring and Performance (vSphere 5.5, vCenter Server 5.5, ESXi 5.5) vSphere Monitoring and Performance是VMware公司开发的一款监控和性能管理工具,用于vSphere 5.5、vCenter Server 5.5和ESXi ...

    Node.js High Performance.pdf

    Take your application to the next level of high performance using the extensive capabilities of Node.js About This Book Analyze, benchmark, and profile your Node.js application to find slow spots, ...

    源代码+书Java EE 8 High Performance

    What you will learnIdentify performance bottlenecks in an applicationLocate application hotspots using performance toolsUnderstand the work done under the hood by EE containers and its impact on ...

    Gartner Application Performance Monitoring.pdf

    标题:Gartner Application Performance Monitoring.pdf 此文档是Gartner公司发布的一份研究报告,主题为应用性能监控(Application Performance Monitoring,简称APM)。这份报告详细分析了应用性能监控领域的市场...

    javamelody程序运行监控报表

    1. **性能监控**:JavaMelody能够实时监测应用服务器(如Tomcat)上的CPU占用率、堆内存使用情况等。 2. **请求统计**:记录每个HTTP请求的响应时间,包括平均响应时间和最长响应时间。 3. **数据库调用统计**:统计...

    javamelody监控

    JavaMelody是一款强大的开源监控工具,专为Java Web应用程序设计,可以帮助开发者和运维人员实时监控应用的性能和健康状况。这个工具集成了多种关键的监控指标,如请求处理时间、内存使用、数据库查询性能、线程状态...

    javamelody.jar和 jrobin.jar

    &lt;filter-class&gt;net.bull.javamelody.MonitoringFilter&lt;/filter-class&gt; &lt;filter-name&gt;monitoring &lt;url-pattern&gt;/* &lt;listener-class&gt;net.bull.javamelody.SessionListener&lt;/listener-class&gt; 通过web...

    Prometheus - Up & Running: Infrastructure and Application Performance Monitoring

    Know where and how much to apply instrumentation to your application code Identify metrics with labels using unique key-value pairs Get an introduction to Grafana, a popular tool for building ...

Global site tag (gtag.js) - Google Analytics