- Apache Karaf Cookbook
- Achim Nierbeck Jamie Goodyear Johan Edstrom Heath Kesler
- 280字
- 2021-09-03 09:55:09
Displaying Camel Context information in Karaf
Karaf can display detailed information about individual Camel Contexts deployed in the container using the camel:context-info
command. Context-wide statistics, behaviors, contained components, and more can be discovered using this command.
Getting ready
Follow the instructions in the Listing Camel Contexts in Karaf recipe's Getting ready section for this recipe.
How to do it…
Use the following camel:context-info
command on the Karaf console to retrieve context information—a small warning, there may be a lot of output generated:
karaf@root()> camel:context-info CamelCommandContext
The output will be as follows:
Camel Context CamelCommandContext Name: CamelCommandContext ManagementName: 123-CamelCommandContext Version: 2.12.2 Status: Started Uptime: 1 hour 50 minutes Statistics Exchanges Total: 1321 Exchanges Completed: 1321 Exchanges Failed: 0 Min Processing Time: 0ms Max Processing Time: 6ms Mean Processing Time: 0ms Total Processing Time: 1110ms Last Processing Time: 1ms Delta Processing Time: 0ms Load Avg: 0.00, 0.00, 0.00 Reset Statistics Date: 2014-02-27 16:01:41 First Exchange Date: 2014-02-27 16:01:42 Last Exchange Completed Date: 2014-02-27 17:51:43 Number of running routes: 1 Number of not running routes: 0 Miscellaneous Auto Startup: true Starting Routes: false Suspended: false Shutdown timeout: 300 sec. Message History: true Tracing: false Properties Advanced ClassResolver: org.apache.camel.core.osgi.OsgiClassResolver@2ffd5a29 PackageScanClassResolver: org.apache.camel.core.osgi.OsgiPackageScanClassResolver@222a525c ApplicationContextClassLoader: BundleDelegatingClassLoader(sample [123]) Components mock bean timer properties Dataformats Languages simple Routes CamelRoute-timerToLog
The preceding camel:context-info
invocation demonstrates that a large quantity of data is available about each context; it is not uncommon for users to capture this output for analysis.
How it works…
The context-info
command hooks into Camel's own facilities to access context information. Upon retrieval, the data is then formatted for display on Karaf's console.
See also
- The Starting and stopping Camel Contexts in Karaf recipe
- Mastering Concurrency Programming with Java 8
- Learn ECMAScript(Second Edition)
- Spring 5.0 By Example
- 樂高機器人設計技巧:EV3結構設計與編程指導
- Swift 3 New Features
- 深入淺出DPDK
- 編譯系統(tǒng)透視:圖解編譯原理
- Instant RubyMotion App Development
- 基于Swift語言的iOS App 商業(yè)實戰(zhàn)教程
- Scratch3.0趣味編程動手玩:比賽訓練營
- Oracle GoldenGate 12c Implementer's Guide
- 搞定J2EE:Struts+Spring+Hibernate整合詳解與典型案例
- OpenStack Networking Essentials
- 智能手機故障檢測與維修從入門到精通
- BeagleBone Robotic Projects(Second Edition)