在ActiveMQ的API中,内置了Jolokia 。

可以使用jmx4perl来安装:

$ perl -MCPAN -e shell
Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.)
ReadLine support available (maybe install Bundle::CPAN or Bundle::CPANxxl?) cpan[]> install JMX::Jmx4Perl
...
...
jmx4perl
======== jmx4perl is a command line utility for accessing Jolokia agents
(www.jolokia.org). It can be used for script based exploration
and easy inspection of the JMX space. Install 'jmx4perl' ? (y/n) [y ]
....

其余的库可以自行安装

root@kali:~# j4psh http://192.168.197.25:8161/api/jolokia -user admin -password admin
[192.168.197.25:] : help
cd -- Enter a domain
connect -- Connect to a server by its URL or symbolic name
error -- Show last error (if any)
help -- Print online help
history -- Command History
ls -- List MBean Domains
quit -- Quit
servers -- Show all configured servers
[192.168.197.25:] : ls
JMImplementation:
type=MBeanServerDelegate jolokia:
type=Config
type=Discovery
type=ServerHandler io.fabric8.insight:
type=LogQuery java.nio:
name=direct,type=BufferPool
name=mapped,type=BufferPool jmx4perl:
type=Config com.sun.management:
type=DiagnosticCommand
type=HotSpotDiagnostic org.apache.activemq:
brokerName=localhost,connector=clientConnectors,connectorName=amqp,type=Broker
brokerName=localhost,connector=clientConnectors,connectorName=mqtt,type=Broker
brokerName=localhost,connector=clientConnectors,connectorName=openwire,type=Broker
brokerName=localhost,connector=clientConnectors,connectorName=stomp,type=Broker
brokerName=localhost,connector=clientConnectors,connectorName=ws,type=Broker
brokerName=localhost,destinationName=121.42..208_1234,destinationType=Topic,type=Broker
brokerName=localhost,destinationName=ActiveMQ.Advisory.MasterBroker,destinationType=Topic,type=Broker
brokerName=localhost,destinationName=ActiveMQ.Advisory.Queue,destinationType=Topic,type=Broker
brokerName=localhost,destinationName=ActiveMQ.Advisory.Topic,destinationType=Topic,type=Broker
brokerName=localhost,destinationName=abc.def,destinationType=Queue,type=Broker
brokerName=localhost,instanceName=KahaDBPersistenceAdapter[/data/apache-activemq-5.15./data/kahadb_Index_/data/apache-activemq-5.15./data/kahadb],service=PersistenceAdapter,type=Broker
brokerName=localhost,service=Health,type=Broker
brokerName=localhost,service=Log4JConfiguration,type=Broker
brokerName=localhost,type=Broker java.lang:
name=Code Cache,type=MemoryPool
name=CodeCacheManager,type=MemoryManager
name=Copy,type=GarbageCollector
name=Eden Space,type=MemoryPool
name=MarkSweepCompact,type=GarbageCollector
name=Metaspace Manager,type=MemoryManager
name=Metaspace,type=MemoryPool
name=Survivor Space,type=MemoryPool
name=Tenured Gen,type=MemoryPool
type=ClassLoading
type=Compilation
type=Memory
type=OperatingSystem
type=Runtime
type=Threading java.util.logging:
type=Logging [192.168.197.25:] : cd java.lang
[192.168.197.25: java.lang] : ls
java.lang:
name=Code Cache,type=MemoryPool
name=CodeCacheManager,type=MemoryManager
name=Copy,type=GarbageCollector
name=Eden Space,type=MemoryPool
name=MarkSweepCompact,type=GarbageCollector
name=Metaspace Manager,type=MemoryManager
name=Metaspace,type=MemoryPool
name=Survivor Space,type=MemoryPool
name=Tenured Gen,type=MemoryPool
type=ClassLoading
type=Compilation
type=Memory
type=OperatingSystem
type=Runtime
type=Threading [192.168.197.25: java.lang] : cd type=ClassLoading
[192.168.197.25: java.lang:type=ClassLoading] : ls
java.lang:type=ClassLoading Attributes:
TotalLoadedClassCount long TotalLoadedClassCount
LoadedClassCount int LoadedClassCount
ObjectName ObjectName ObjectName
UnloadedClassCount long UnloadedClassCount
Verbose boolean Verbose [192.168.197.25: java.lang:type=ClassLoading] : cat ObjectName
{
objectName => 'java.lang:type=ClassLoading'
}
[192.168.197.25: java.lang:type=ClassLoading] :

使用jmx4perl和j4psh接管Jolokia的更多相关文章

  1. 让Chrome 接管邮件连接,收发邮件更方便了

    页面中除了传统的超链接外,还可以将邮箱地址写入<a>标签,意思不表自明,当然是用户点击后就会打开相应的邮件客户端向这个连接指向的邮件地址发邮件. <a href="mail ...

  2. Activemq Jolokia

    打开JMX <broker … useJmx="true"> … <managementContext> <managementContext cre ...

  3. MVC之前的那点事儿系列(9):MVC如何在Pipeline中接管请求的?

    文章内容 上个章节我们讲到了,可以在HttpModules初始化之前动态添加Route的方式来自定义自己的HttpHandler,最终接管请求的,那MVC是这么实现的么?本章节我们就来分析一下相关的M ...

  4. 010 使用netmap API接管网卡,接收数据包,回应ARP请求

    一.本文目的: 上一节中,我们已经在CentOS 6.7 上安装好了netmap,也能接收和发送包了,这节我们来调用netmap中的API,接管网卡,对网卡上收到的数据包做分析,并回应ARP请求. 二 ...

  5. Windows Server 2008 R2 创建辅助DNS服务器并接管主要DNS服务器

    公司需求: Zhuyu公司局域网有一台主要DNS服务器,经领导讨论需要规划安装一台辅助DNS服务器备用. 功能需求: 当主要DNS服务器宕机或系统崩溃,辅助DNS服务器能接管主要DNS服务器工作,并且 ...

  6. php session session_set_save_handler 接管所有的session管理工作

    一个已知管用的方法是,使用session_set_save_handler,接管所有的session管理工作,一般是把session信息存储到数 据库,这样可以通过SQL语句来删除所有过期的sessi ...

  7. C#- 基于Lumisoft.NET组件的POP3邮件接管和删除操纵

    Lumisoft.NET组件是一个很是强大的邮件发送.邮件接管等功能的开源组件,一般用它来处理惩罚邮件的相干操纵,是很是合适的.之前也写过一些该组件的漫笔文章,不过主如果哄骗来发送邮件居多,比来因为项 ...

  8. 传京东副总裁蒉莺春或将接管POP业务-搜狐IT

    传京东副总裁蒉莺春或将接管POP业务-搜狐IT 传京东副总裁蒉莺春或将接管POP业务

  9. MVC如何在Pipeline中接管请求的?

    MVC如何在Pipeline中接管请求的? 文章内容 上个章节我们讲到了,可以在HttpModules初始化之前动态添加Route的方式来自定义自己的HttpHandler,最终接管请求的,那MVC是 ...

随机推荐

  1. Springmvc跳转路径

    forward转发地址栏不发生变化,redirect跳转地址栏变化,forward能把request域中的参数带给下一个,而redirect不会带过去,但是Springmvc的model虽然是基于re ...

  2. 搭建confluence参考文献

    https://www.cnblogs.com/kevingrace/p/7607442.html https://yq.aliyun.com/articles/144747?t=t1 jira: h ...

  3. URAL 2062 树状数组

    一个长度为n的数组 每次对lr区间进行修改 如果要修改i 则对i i*2 i*3...都修改 最后单点查询值 思想是利用树状数组维护每一个区间的更新值 查询的时候得出这个点的所有因子的查询值的和 加上 ...

  4. Spring Boot 注释

    1.@RestController@RestController ≍ @Controller + @ResponseBody在Controller文件 public class xxxx 前面加用于返 ...

  5. dp2--合并石子(一)

    dp2--合并石子(一) 一.心得 二.题目 石子合并(一) 时间限制:1000 ms  |  内存限制:65535 KB 难度:3   描述     有N堆石子排成一排,每堆石子有一定的数量.现要将 ...

  6. spring: 使用嵌入式数据源 EmbeddedDatabaseBuilder

    嵌入式数据源作为应用的一部分运行,非常适合在开发和测试环境中使用,但是不适合用于生产环境.因为在使用嵌入式数据源的情况下,你可以在每次应用启动或者每次运行单元测试之前初始化测试数据. 使用Spring ...

  7. EF切换到Mysql数据库,更改web.config

    1)引用: MySql.Data.dll,MySql.Data.Entity.dll,MySql.Data.Entity.EF6.dll 2)添加: <system.data> <D ...

  8. 缓存淘汰算法--LRU算法(转)

    (转自:http://flychao88.iteye.com/blog/1977653) 1. LRU1.1. 原理 LRU(Least recently used,最近最少使用)算法根据数据的历史访 ...

  9. java 简单解析wsdl

    static void resolve(String wsdl) throws Exception { DocumentBuilderFactory factory = DocumentBuilder ...

  10. 项目管理理论与实践(5)——UML应用(下)

    本篇文章介绍UML的相关知识.参考<UML从入门到精通> 六.状态机视图 1. 概述 状态机视图通过对类对象的生存周期建立模型来描述对象随时间变化的动态行为.状态是给定类的对象的一组属性值 ...