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.
The build uses Apache Maven. Simply use:
mvn clean install
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
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