JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server Message Queue 4.5 Administration Guide
search filter icon
search icon

Document Information

Preface

Part I Introduction to Message Queue Administration

1.  Administrative Tasks and Tools

2.  Quick-Start Tutorial

Part II Administrative Tasks

3.  Starting Brokers and Clients

4.  Configuring a Broker

5.  Managing a Broker

6.  Configuring and Managing Connection Services

7.  Managing Message Delivery

8.  Configuring Persistence Services

9.  Configuring and Managing Security Services

10.  Configuring and Managing Broker Clusters

11.  Managing Administered Objects

12.  Configuring and Managing Bridge Services

13.  Monitoring Broker Operations

Monitoring Services

Introduction to Monitoring Tools

Configuring and Using Broker Logging

Logger Properties

Log Message Format

Default Logging Configuration

Changing the Logging Configuration

To Change the Logger Configuration for a Broker

Changing the Output Channel

Changing Log File Rollover Criteria

Sending Metrics Data to Log Files

Logging Dead Messages

Using the Command Utility to Display Metrics Interactively

imqcmd metrics

To Use the metrics Subcommand

Metrics Outputs: imqcmd metrics

Brokerwide Metrics

Connection Service Metrics

Physical Destination Metrics

imqcmd query

Using the JMX Administration API

Using the Java ES Monitoring Console

Using the Message-Based Monitoring API

Setting Up Message-Based Monitoring

To Set Up Message-based Monitoring

Security and Access Considerations

Metrics Outputs: Metrics Messages

14.  Analyzing and Tuning a Message Service

15.  Troubleshooting

Part III Reference

16.  Command Line Reference

17.  Broker Properties Reference

18.  Physical Destination Property Reference

19.  Administered Object Attribute Reference

20.  JMS Resource Adapter Property Reference

21.  Metrics Information Reference

22.  JES Monitoring Framework Reference

Part IV Appendixes

A.  Distribution-Specific Locations of Message Queue Data

B.  Stability of Message Queue Interfaces

C.  HTTP/HTTPS Support

D.  JMX Support

E.  Frequently Used Command Utility Commands

Index

Using the Command Utility to Display Metrics Interactively

A Message Queue broker can report metrics of the following types:

The imqcmd command can obtain metrics information for the broker as a whole, for individual connection services, and for individual physical destinations. To obtain metrics data, you generally use the metrics subcommand of imqcmd. Metrics data is written at an interval you specify, or the number of times you specify, to the console screen.

You can also use the query subcommand to view similar data that also includes configuration information. See imqcmd query for more information.

imqcmd metrics

The syntax and options of imqcmd metrics are shown in Table 13-3 and Table 13-4, respectively.

Table 13-3 imqcmd metrics Subcommand Syntax

Subcommand Syntax
Metrics Data Provided
metrics bkr [-b hostName:portNumber] [-m metricType] [-int interval] [-msp numSamples]
Displays broker metrics for the default broker or a broker at the specified host and port.
metrics svc -n serviceName [-b hostName:portNumber] [-m metricType] [-int interval] [-msp numSamples]
Displays metrics for the specified service on the default broker or on a broker at the specified host and port.
metrics dst -t destType -n destName [-b hostName:portNumber] [-m metricType] [-int interval] [-msp numSamples]
Displays metrics information for the physical destination of the specified type and name.

Table 13-4 imqcmd metrics Subcommand Options

Subcommand Options
Description
-b hostName: portNumber
Specifies the hostname and port of the broker for which metrics data is reported. The default is localhost:7676.

Literal IP addresses as host names: You can use a literal IPv4 or IPv6 address as a host name. If you use a literal IPv6 address, its format must conform to RFC2732, Format for Literal IPv6 Addresses in URL's.

-int interval
Specifies the interval (in seconds) at which to display the metrics. The default is 5 seconds.
-m metricType
Specifies the type of metric to display:

ttl Displays metrics on messages and packets flowing into and out of the broker, service, or destination (default metric type).

rts Displays metrics on rate of flow of messages and packets into and out of the broker, connection service, or destination (per second).

cxn Displays connections, virtual memory heap, and threads (brokers and connection services only).

con Displays consumer-related metrics (destinations only).

dsk Displays disk usage metrics (destinations only).

-msp numSamples
Specifies the number of samples displayed in the output. The default is an unlimited number (infinite).
-n destName
Specifies the name of the physical destination (if any) for which metrics data is reported. There is no default.
-n serviceName
Specifies the connection service (if any) for which metrics data is reported. There is no default.
-t destType
Specifies the type (queue or topic) of the physical destination (if any) for which metrics data is reported. There is no default.

To Use the metrics Subcommand

  1. Start the broker for which metrics information is desired.

    See Starting Brokers.

  2. Issue the appropriate imqcmd metrics subcommand and options as shown in Table 13-3 and Table 13-4.

Metrics Outputs: imqcmd metrics

This section contains examples of output for the imqcmd metrics subcommand. The examples show brokerwide, connection service, and physical destination metrics.

Brokerwide Metrics

To get the rate of message and packet flow into and out of the broker at 10 second intervals, use the metrics bkr subcommand:

imqcmd metrics bkr -m rts -int 10 -u admin

This command produces output similar to the following (see data descriptions in Table 21-2):

--------------------------------------------------------
 Msgs/sec   Msg Bytes/sec   Pkts/sec    Pkt Bytes/sec   
 In   Out     In      Out     In   Out     In      Out  
--------------------------------------------------------
 0     0      27      56      0     0      38      66   
 10    0     7365     56      10    10    7457    1132  
 0     0      27      56      0     0      38      73   
 0     10     27     7402     10    20    1400    8459  
 0     0      27      56      0     0      38      73   

Connection Service Metrics

To get cumulative totals for messages and packets handled by the jms connection service, use the metrics svc subcommand:

imqcmd metrics svc -n jms -m ttl -u admin

This command produces output similar to the following (see data descriptions in Table 21-3):

-------------------------------------------------
  Msgs      Msg Bytes      Pkts      Pkt Bytes     
In   Out    In     Out   In   Out    In     Out  
-------------------------------------------------
164  100  120704  73600  282  383  135967  102127
657  100  483552  73600  775  876  498815  149948

Physical Destination Metrics

To get metrics information about a physical destination, use the metrics dst subcommand:

imqcmd metrics dst -t q -n XQueue -m ttl -u admin

This command produces output similar to the following (see data descriptions in Table 21-4):

-----------------------------------------------------------------------------
  Msgs      Msg Bytes         Msg Count         Total Msg Bytes (k)     Largest
In   Out    In     Out    Current  Peak  Avg  Current  Peak     Avg    Msg (k)
-----------------------------------------------------------------------------
200  200  147200  147200     0     200    0      0      143      71        0  
300  200  220800  147200    100    200   10     71      143      64        0  
300  300  220800  220800     0     200    0      0      143      59        0  

To get information about a physical destination’s consumers, use the following metrics dst subcommand:

imqcmd metrics dst -t q -n SimpleQueue -m con -u admin

This command produces output similar to the following (see data descriptions in Table 21-4):

------------------------------------------------------------------
  Active Consumers         Backup Consumers         Msg Count
Current  Peak  Avg      Current  Peak    Avg    Current  Peak  Avg
------------------------------------------------------------------
   1       1      0        0       0      0       944    1000  525

imqcmd query

The syntax and options of imqcmd query are shown in Table 13-5 along with a description of the metrics data provided by the command.

Table 13-5 imqcmd query Subcommand Syntax

Subcommand Syntax
Metrics Data Provided
query bkr
   [-b hostName: portNumber]
Information on the current number of messages and message bytes stored in broker memory and persistent store (see Viewing Broker Information).
or
query svc -n serviceName
  [-b  hostName:portNumber]
Information on the current number of allocated threads and number of connections for a specified connection service (see Viewing Connection Service Information).
or
query dst -t destType
  -n destName
  [-b hostName:portNumber]
Information on the current number of producers, active and backup consumers, and messages and message bytes stored in memory and persistent store for a specified destination (see Viewing Physical Destination Information).

Note - Because of the limited metrics data provided by imqcmd query , this tool is not represented in the tables presented in Chapter 21, Metrics Information Reference.