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 attachments
I Attachment History Action Size Date Who Comment
Texttxt jmx-multi-query.pl.txt r1 manage 2.0 K 2009-08-31 - 09:02 JulienPerrochet2 jmx-multi-query script, as of the 31st of August 2009
Texttxt jmx-query.pl.txt r1 manage 0.6 K 2009-08-31 - 09:01 JulienPerrochet2 jmx-query script, as of the 31st of August 2009
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2009-09-15 - unknown
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    EGEE All webs login

This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Ask a support question or Send feedback