tree: cdc4fffe53f0b1c5736805b83e4266fac65dd554 [path history] [tgz]
  1. src/
  2. pom.xml
  3. README.md
examples/karaf-dump-example/README.md

Apache Karaf Diagnostic Dump example

Abstract

This example shows how to create a new dump provider service. This provider is automatically included in the dump created by the dev:dump-create command.

The dump provider example actually takes a screenshot of client screen.

Build

The build uses Apache Maven. Simply use:

mvn clean install

Deployment

On a running Karaf instance, install the scr feature and the dump bundle:

karaf@root()> feature:install scr
karaf@root()> bundle:install -s mvn:org.apache.karaf.examples/karaf-dump-example/LATEST

Usage

Once you have installed the bundle, you can take a dump using:

karaf@root()> dev:dump-create

You will find the dump zip file in the Karaf home folder. If you extract this zip, in addition of the regular files (heap dump, thread dump, ...), you will see screenshot files created by our example dump provider:

Archive:  xxxx-xx-xx_xxxxxx.zip
  inflating: environment.txt         
  inflating: memory.txt              
  inflating: threads.txt             
  inflating: heapdump.txt            
  inflating: bundles.txt             
  inflating: features.txt            
  inflating: screenshot/display_0.png  
  inflating: screenshot/display_1.png  
  inflating: log/security.log        
  inflating: log/karaf.log