使用jmx4perl和j4psh接管Jolokia
在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的更多相关文章
- 让Chrome 接管邮件连接,收发邮件更方便了
页面中除了传统的超链接外,还可以将邮箱地址写入<a>标签,意思不表自明,当然是用户点击后就会打开相应的邮件客户端向这个连接指向的邮件地址发邮件. <a href="mail ...
- Activemq Jolokia
打开JMX <broker … useJmx="true"> … <managementContext> <managementContext cre ...
- MVC之前的那点事儿系列(9):MVC如何在Pipeline中接管请求的?
文章内容 上个章节我们讲到了,可以在HttpModules初始化之前动态添加Route的方式来自定义自己的HttpHandler,最终接管请求的,那MVC是这么实现的么?本章节我们就来分析一下相关的M ...
- 010 使用netmap API接管网卡,接收数据包,回应ARP请求
一.本文目的: 上一节中,我们已经在CentOS 6.7 上安装好了netmap,也能接收和发送包了,这节我们来调用netmap中的API,接管网卡,对网卡上收到的数据包做分析,并回应ARP请求. 二 ...
- Windows Server 2008 R2 创建辅助DNS服务器并接管主要DNS服务器
公司需求: Zhuyu公司局域网有一台主要DNS服务器,经领导讨论需要规划安装一台辅助DNS服务器备用. 功能需求: 当主要DNS服务器宕机或系统崩溃,辅助DNS服务器能接管主要DNS服务器工作,并且 ...
- php session session_set_save_handler 接管所有的session管理工作
一个已知管用的方法是,使用session_set_save_handler,接管所有的session管理工作,一般是把session信息存储到数 据库,这样可以通过SQL语句来删除所有过期的sessi ...
- C#- 基于Lumisoft.NET组件的POP3邮件接管和删除操纵
Lumisoft.NET组件是一个很是强大的邮件发送.邮件接管等功能的开源组件,一般用它来处理惩罚邮件的相干操纵,是很是合适的.之前也写过一些该组件的漫笔文章,不过主如果哄骗来发送邮件居多,比来因为项 ...
- 传京东副总裁蒉莺春或将接管POP业务-搜狐IT
传京东副总裁蒉莺春或将接管POP业务-搜狐IT 传京东副总裁蒉莺春或将接管POP业务
- MVC如何在Pipeline中接管请求的?
MVC如何在Pipeline中接管请求的? 文章内容 上个章节我们讲到了,可以在HttpModules初始化之前动态添加Route的方式来自定义自己的HttpHandler,最终接管请求的,那MVC是 ...
随机推荐
- java.net.UnknownHostException异常处理
1.问题描述 最近迁移环境,在Linux系统下部署Java产品的应用,后台报出如下异常,系统报找不到名为“xxx-houtai1”的主机: 1 java.net.UnknownHostExceptio ...
- ADO.Net连接Mysql
首先下载一个mysql.data.dll拷贝到bin下面并引用一下 using MySql.Data.MySqlClient; class Program { static void Main(str ...
- C# 处理base64 以及base64的原理分析
base64的原理, http://www.cnblogs.com/diligenceday/p/6002382.html http://www.cnblogs.com/chengxiaohui/ar ...
- mysql在表的某一位置增加一列的命令
如果想在一个已经建好的表中添加一列,可以用诸如: alter table t1 add column addr varchar(20) not null; 这条语句会向已有的表t1中加入一列addr, ...
- javascript(jquery)_匿名函数
一.什么是匿名函数 匿名函数:就是没有函数名的函数 二.为什么使用匿名函数 1.最大的用处就是创建闭包 三.匿名函数定义(怎么使用匿名函数) 1.这种方法使用了Function构造函数,把参数列表和函 ...
- localstorage存储对象
之前在客户端存储数据一直用的是cookie,由于有大小等限制,随着html5时代的到来,现在大多数用的是localstorage存储数据: 例如: localStorage.setItem(" ...
- MDX跨cube查询——lookupcube
关于SSAS中从多个cube中查询数据 前提:涉及的cube在同一数据库中,维度共享(最好) SSAS中提供一条mdx语句同时从多个cube中查询数据的功能 实现该功能的就是lookupcube函数, ...
- 2017-02-20 注册.Net Framework4.0
在使用IIS发布Web应用程序时,有时会遇到Asp.Net 4.0尚未在Web服务器上注册的问题,需要手动注册下.Net Framework 4.0. 注册.net Framwork4.0 步骤,以w ...
- C语言基础三
C--数组 一维数组的定义和引用 定义:类型说明符 数组名[常量表达式] int a[ 10 ];他表示定义了一个整形数组,数组名为a,有10个元素. 注意:C语言不允许对数组的大小做动态定义. 一维 ...
- shell获取ip地址
Mac: $ ifconfig en0|awk -F"[ ]+" '/inet/{print $2}' fe80::a211:9bff:fe15:%en0 192.168.0.10 ...