Mathias Scharl 1 Siegfried Göschl 2 1 Verisign Platform Development Vienna 2 Independent Contractor Vienna Vienna, July 17, 2007 1 / 21
Outline 1 Motivation 2 Basics 3 Methods of Instrumentation 4 Analysis 2 / 21
Outline 1 Motivation 2 Basics 3 Methods of Instrumentation 4 Analysis 3 / 21
Motivation Possibilities to Monitor a Production System server analysis / operating system specific approach logfile analysis profiler Requirements avoid flood of information minimize performance impact clear presentation of the gathered data 4 / 21
Motivation Possibilities to Monitor a Production System server analysis / operating system specific approach logfile analysis profiler Requirements avoid flood of information minimize performance impact clear presentation of the gathered data 4 / 21
Advantages of JAMon Advantages of JAMon high performance easy to administer simple API flexible aggregation of data open source 5 / 21
Outline 1 Motivation 2 Basics 3 Methods of Instrumentation 4 Analysis 6 / 21
Basics Installation - Dependencies jamon.jar JAMon Monitors Labels (z.b.: "myclass.mymethod()", "numberofactiveusers",...) Units (z.b.: ms., user, mb, $,...) Ranges (z.b.: 0-10, 10-20,...) 7 / 21
Basics Installation - Dependencies jamon.jar JAMon Monitors Labels (z.b.: "myclass.mymethod()", "numberofactiveusers",...) Units (z.b.: ms., user, mb, $,...) Ranges (z.b.: 0-10, 10-20,...) 7 / 21
Example - Creation of a Monitor Creation of a Time Monitor MyClass instance =... Monitor monitor = MonitorFactory.start("MyClass.myMethod()"); instance.mymethod(); monitor.stop(); 8 / 21
Example - Performance Monitor 9 / 21
Example - Custom Units 10 / 21
Outline 1 Motivation 2 Basics 3 Methods of Instrumentation 4 Analysis 11 / 21
Methods of Instrumentation Methods of Instrumentation servlet filter manual instrumentation dynamic proxies call using an application framework 12 / 21
Servlet Filter Advantages web.xml no additional code necessary monitor access to ressources of a web-application <web-app> <display-name>yourapp</display-name> <filter> <filter-name>jamonfilter</filter-name> <filter-class>com.jamonapi.jamonfilter</filter-class> </filter> <filter-mapping> <filter-name>jamonfilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app> 13 / 21
Manual Instrumentation Application Areas central dispatching point adopt monitor to application specific needs 14 / 21
Dynamic Proxies - Method Calls MonProxyFactory myobject = (MyInterface) MonProxyFactory.monitor(new MyObject()); myobject.mymethod(); 15 / 21
Dynamic Proxies - Exceptions Exceptions total number of exceptions number of exceptions per type number of exceptions per method Exception Details ID timestamp stacktrace method 16 / 21
Dynamic Proxies - Exceptions Exceptions total number of exceptions number of exceptions per type number of exceptions per method Exception Details ID timestamp stacktrace method 16 / 21
Dynamic Proxies - JDBC Interfaces JDBC Connection Connection monitoredconnection = MonProxyFactory.monitor(originalConnection); returned statements and resultsets are also included in the monitor 17 / 21
Call Using an Application Framework AOP Interceptors Spring Framework: org.springframework.aop.interceptor.jamonperformancemonitorinterceptor Fulcrum YAAFI: org.apache.fulcrum.yaafi.interceptor.jamon.jamoninterceptorserive 18 / 21
Outline 1 Motivation 2 Basics 3 Methods of Instrumentation 4 Analysis 19 / 21
Analysis jamonadmin.jsp filter and sort gathered data data export -> XML, CSV, MS-Excel de-/activation of the monitor refresh / reset of the report 20 / 21
Conclusion Advantages of JAMon tool between the classic profiler and operation system specific approaches Outlook numerous points of usage clearly structured presentation of gathered data log4j appender listener 21 / 21
Conclusion Advantages of JAMon tool between the classic profiler and operation system specific approaches Outlook numerous points of usage clearly structured presentation of gathered data log4j appender listener 21 / 21