官术网_书友最值得收藏!

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
主站蜘蛛池模板: 潮州市| 鄂托克旗| 定结县| 松江区| 绥中县| 页游| 福州市| 区。| 福安市| 金昌市| 高阳县| 洛宁县| 台江县| 徐水县| 浦江县| 云阳县| 西贡区| 磴口县| 逊克县| 韶关市| 渑池县| 淅川县| 建湖县| 海宁市| 石楼县| 建瓯市| 东阳市| 遂昌县| 仙游县| 行唐县| 顺义区| 宣化县| 留坝县| 泽普县| 社会| 青冈县| 敦化市| 和顺县| 泽库县| 防城港市| 溧水县|