201403-ICPE-Dublin¶
Information¶
The 2-hour tutorial was held on March 23, 2014 at the ` 5th ACM/SPEC International Conference on Performance Engineering <http://icpe2014.ipd.kit.edu/>`_ in Dublin, Irland.
Presenters:
Andre van Hoorn, University of Stuttgart, Germany
Nils Ehmke, Kiel University, Germany
For this tutorial, Kieker version 1.8 has been used.
Material provided outside this Wiki page:
Kieker and Kieker.WebGUI release archives (binary and doc): http://kieker-monitoring.net/download/
Kieker user guide: kieker-1.8_userguide.pdf
Presentation slides:
Original slides with overlays: 20140323-ICPE-Tutorial-slides.pdf
Handout versions: 20140323-ICPE-Tutorial-handout.pdf
Schedule¶
14:30 Introduction and Overview of Approach (avh)
14:45 Interactive: Quick Start (nie)
15:00 Intro (cont’d) (avh)
15:05 Use Cases in Research and Practice (avh)
15:20 Kieker’s Monitoring Component (avh)
15:35 Kieker’s Analysis Component & WebGUI (nie)
15:50 Interactive: Java EE Monitoring (avh)
16:05 A Detailed Look at Selected Use Cases (nie/avh)
16:30 End
Instructions for the Interactive Parts¶
It makes sense to put the following parts to separate pages.
Preparation¶
Unzip source and binary release archives
20140323-ICPE-Tutorial/kieker-1.8-release <master>* $ unzip kieker-1.8_binaries.zip && mv kieker-1.8 kieker-1.8-bin
20140323-ICPE-Tutorial/kieker-1.8-release <master>* $ unzip kieker-1.8_sources.zip && mv kieker-1.8 kieker-1.8-src
Start Eclipse with new/empty workspace 20140323-ICPE-Tutorial/workspace-avh
Quick Start (nie)¶
Preparation:
Create shortlink to directory 20140323-ICPE-Tutorial in Konqueror
Create new workspace in eclipse, located in 20140323-ICPE-Tutorial/eclipse-workspace
Download -> s. Folie
Files to be found in dir: 20140323-ICPE-Tutorial/download-kieker-1.8/
User Guide vorstellen
Extract kieker-1.8_binaries.zip to 20140323-ICPE-Tutorial/
… and rename to kieker-1.8-binaries
Presentation of Release Archive (Binary, Source, User Guide)
Bookstore-Beispiel mit AspectJ aus dem User Guide
Bookstore ohne Instrumentierung
Import example project ch2–bookstore-application into workspace
Bookstore zunächst kurz vorstellen
Starten ohne Instrumentierung: BookstoreStarter.java -> run as -> Java application
Instrumentierung mit AspectJ (Vollinstrumentierung ohne Annotationen)
Create directory lib/
Copy kieker-1.8_aspectj.jar
Create directory src/META-INF
Copy aop.example.xml to src/META-INF/aop.xml
Select full aspect and include “*”
run with -javaagent:lib/kieker-1.8_aspectj.jar
Filesystem-Log
Show console output
Show .map and .dat file in Konqueror
TraceAnalyse mit Visualisierung
Add kieker-1.8_emf.jar to build path
Add commons-cli-1.2.jar to build path
Run *TraceAnalysisTool* (run kieker-1.8_emf.jar as “Java Application”)
Run configuration with program arguments:
-i /tmp/kieker-20121121-150448579-UTC-pc-vanhoorn-KIEKER-SINGLETON
–plot-Deployment-Operation-Dependency-Graph
-o .
Show output
HTML-Systemmodell
Abhaengigkeitsgraph (Deployment-Operation + ggf. mehr)
Call-Tree-Varianten
Sequenzdiagramm -> “if possible”
Monitoring (avh)¶
Import Kieker source project (20140323-ICPE-Tutorial/kieker-1.8-release/kieker-1.8-src/) into the workspace (“Import…”->”Import existing project into workspace”)
Show example record CPUUtilizationRecord
Show example probe CPUsDetailedPercSampler
Analysis (nie)¶
…
WebGUI (nie)¶
Mem/swap example without CPU (to be prepared)
Open analysis editor
Explain example
Add CPU filter
Start analysis
Cockpit
JavaEE (avh)¶
Quick start¶
Change dir to prepared Jetty 20140323-ICPE-Tutorial/kieker-1.8-release/kieker-1.8-bin/examples/JavaEEServletContainerExample/jetty-hightide-jpetstore
Start instrumented JPetStore
jetty-hightide-jpetstore <master>* $ java -jar start.jar
Explain console output and tail -f on monitoring log
Access JPetStore http://localhost:8080/jpetstore/ and click around
Create and show plots
jetty-hightide-jpetstore <master>* $ mkdir plots
jetty-hightide-jpetstore <master>* $ ../../../bin/trace-analysis.sh -i /tmp/kieker-20140319-150803890-UTC-avh-ThinkPad-RSS-KIEKER-EXAMPLE-JAVAEE/ -o plots/ –plot-Deployment-Component-Dependency-Graph –plot-Assembl
y-Component-Dependency-Graph –plot-Deployment-Operation-Dependency-Graph responseTimes –plot-Assembly-Operation-Dependency-Graph responseTimes –print-System-Model
jetty-hightide-jpetstore <master>* $ ../../../bin/dotPic-fileConverter.sh plots/ pdf
jetty-hightide-jpetstore <master>* $ acroread plots/*.pdf&
Advanced¶
Explain instrumentation (Spring, Servlet)
Use a custom Kieker configuration:
Copy META-INF from binary release to JavaEE example
jetty-hightide-jpetstore <master>* $ cp -R ../../../META-INF/ .
Edit kieker.monitoring.properties:
hostname=ICPE14-SRV
jmx=true
adaptiveMonitoring.enabled=true
kieker.monitoring.writer.filesystem.AsyncFsWriter.customStoragePath=kieker-logs
Create output dir
jetty-hightide-jpetstore <master>* $ mkdir kieker-logs
Activate configuration in start.ini
–exec
-Dkieker.monitoring.configuration=META-INF/kieker.monitoring.properties
Sigar Sampler for CPU and MEM
Copy Sigar Jar and {dll|so|…} to webapps/WEB-INF/lib/
jetty-hightide-jpetstore <master> $ cp ../../../lib/sigar-1.6.4.jar ../../../lib/sigar-native-libs/* webapps/jpetstore/WEB-INF/lib/
Activate kieker.monitoring.probe.servlet.CPUMemUsageServletContextListener in webapps/jpetstore/WEB-INF/web.xml
Restart Jetty
Click around a bit
Show log
Attach to Monitoring Controller via JConsole:
/usr/lib/jvm/sun-jdk1.6.0_38/bin/jconsole &
toString
Demonstrate adaptive Monitoring
Disable public void kieker.monitoring.probe.servlet.SessionAndTraceRegistrationFilter.doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
enable/disable/terminate
Restart Jetty
Click around
Bonus:¶
Sigar analysis from User Guide
Fix project
Add kieker.jar and sigar.jar to build path
run
AspectJ-based instrumentation