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 : .

This perl script will query the specified bean on the specified server and return the value of a specified attribute.

  • Usage : ./ server bean attribute
  • Example : ./ "http://myJeeServer:port/j4p" ",Type=Broker" TotalDequeueCount

The script simply outputs the value, without any formatting.

This script does the same thing as 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 : ./ server bean attribute1 attribute2 ...
  • Output : attr1:value1 attr2:value2 ...
Multiple Beans mode -b
One attribute, multiple beans.

  • Usage : ./ server attribute bean1 bean2 ...
  • Output : bean1:value1 bean2:value2 ...
Multi-query mode -m
Any bean:attribute pair.

  • Usage : ./ server bean1 attribute1 bean2 attribute2 ...
  • Output : bean1:attr1:value bean2:attribute2:value ...


Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt r1 manage 2.0 K 2009-08-31 - 09:02 JulienPerrochet2 jmx-multi-query script, as of the 31st of August 2009
Texttxt 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