JMX Query Tool
Table of Contents
A monitoring tool
If you run some java stuff, you might want to monitor some specific things going on. The scripts on this page permit you to get informations relative to Java running on a server by using Jmx4Perl. It is however required that the corresponding servlet is installed on the server for this to work.
The latest version of the script can be loaded from the current
UseLocalActiveMQForMessaging project SVN specified on the page in the monitoring directory. Should this no longer be the case, the scripts are also attached to this page, but they will not be updated.
Author :
JulienPerrochet - 2009-08-28
Jmx4Perl module and Servlet
You will find the necessary files for module and servlet installation here :
http://search.cpan.org/~roland/jmx4perl/
.
jmx-query.pl
This perl script will query the specified bean on the specified server and return the value of a specified attribute.
- Usage :
./jmx-query.pl server bean attribute
- Example :
./jmx-query.pl "http://myJeeServer:port/j4p" "org.apache.activemq:BrokerName=lxbrf2711.cern.ch,Type=Broker" TotalDequeueCount
The script simply outputs the value, without any formatting.
jmx-multi-query.pl
This script does the same thing as
jmx-query.pl
except that you can do multiple queries within the same connection to a specified server. Different modes are available and are trigerred by the corresponding option.
Multiple Attributes mode (default)
One bean, multiple attributes.
- Usage :
./jmx-multi-query.pl server bean attribute1 attribute2
...
- Output :
attr1:value1 attr2:value2
...
Multiple Beans mode -b
One attribute, multiple beans.
- Usage :
./jmx-multi-query.pl server attribute bean1 bean2
...
- Output :
bean1:value1 bean2:value2
...
Multi-query mode -m
Any
bean:attribute
pair.
- Usage :
./jmx-multi-query.pl server bean1 attribute1 bean2 attribute2
...
- Output :
bean1:attr1:value bean2:attribute2:value
...
Files
Topic revision: r3 - 2009-09-15
- unknown