一:從網上搜索,發現 javamelody 監控web應用程序不錯。
啟動服務器,
通過訪問你項目的url/monitoring就可以訪問了 ,比如我的訪問路徑為:http://localhost:8088/test/monitoring
JavaMelody能夠在QA和實際運行生產環境監測Java或Java EE應用程序服務器。并以圖表的形式顯示:Java內存和Java CPU使用情況,用戶Session數量,JDBC連接數,和http請求、sql請求、jsp頁面與業務接口方法(EJB3、Spring、Guice)的執行數量,平均執行時間,錯誤百分比等。圖表可以按天,周,月,年或自定義時間段查看。
使用配置如下,在JavaWeb項目的web.xml文件中加入如下配置:
<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>
二:然后啟動服務器,
通過訪問你項目的url/monitoring就可以訪問了 ,比如我的訪問路徑為:http://localhost:8088/test/monitoring
三:效果圖如下:
四:jar下載地址:http://download.csdn.net/detail/sxdtzhaoxinguo/7616183
五:官網下載地址:https://code.google.com/p/javamelody/downloads/list