在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. nginx根据项目名实现内网地址转发

    nginx根据访问的项目名进行内网地址转发 以下是nginx的配置信息: server { listen 8081; server_name localhost; #charset koi8-r; # ...

  2. netty上手

    关于netty的基础NIO,请参见:NIO原理及实例 下面介绍Netty的上手使用: 首先为项目添加jar依赖: <dependency> <groupId>io.netty& ...

  3. HDU 4000 Fruit Ninja (树状数组+反向思维)

    题意:给你一串数且每个数都不同,问你(x,y,z)出现 x<z<y 的总次数 首先我们直接想的话不能使用O(n*log2 n)解决,所以可以正难则反 可以求得x<(y,z)的值,减去 ...

  4. php 策略模式案例

    策略模式,将一组特定的行为和算法封装成类,以适应某些特定的上下文环境. eg:假如有一个电商网站系统,针对男性女性用户要各自跳转到不同的商品类目,并且所有的广告位展示不同的广告.在传统的代码中,都是在 ...

  5. SSIS之序列容器

    序列容器是一种十分简单,但使用非常广泛的容器,它可以对控制流的任务流组件进行结构化处理,把一些业务相关的任务组件,放到一个序列容器中,使整个包看起来更加整洁.美观,就如同我们家里的书柜.衣柜似的,把不 ...

  6. 一道问题引出的python中可变数据类型与不可变数据类型

    一. 问题的提出 我们先来看两个对比 第一道题,当对象为整数时,最终结果:b = 2, a = 1,b的变化没有引起a的变化 a = 1 b = a b += 1 print(a) print(b) ...

  7. Swift 3.0 on Ubuntu 15.10

    一.安装swift 3.0 1. 下载 https://swift.org/download/ 找到swift-3.0 ubuntu 15.10版本下载: https://swift.org/buil ...

  8. LeetCode OJ:Sort Colors(排序颜色)

    Given an array with n objects colored red, white or blue, sort them so that objects of the same colo ...

  9. 详解linux互斥锁 pthread_mutex和条件变量pthread_cond

    [cpp] view plaincopy ============================================================= int pthread_creat ...

  10. ThinkPHP中的find和select的区别

    ThinkPHP作为PHP中应用广泛又好用的框架,能比较快速的开发MVC架构的管理系统,获得了大量的应用.但是在ThinkPHP中select()和find()方法有什么区别呢? 事实上find()返 ...