To list the physical destinations on a broker, use the imqcmd list dst subcommand:
imqcmd list dst -b hostName:portNumber [-t destType] [-tmp]
This lists all physical destinations on the broker identified by hostName and portNumber of the type (queue or topic) specified by destType. If the -t option is omitted, both queues and topics are listed. For example, the following command lists all physical destinations on the broker running on host myHost at port number 4545:
imqcmd list dst -b myHost:4545
The list of queue destinations always includes the dead message queue (mq.sys.dmq) in addition to any other queue destinations currently existing on the broker.
If you specify the -tmp option, temporary destinations are listed as well. These are destinations created by clients, normally for the purpose of receiving replies to messages sent to other clients.
The imqcmd query dst subcommand displays information about a single physical destination:
imq query dst -t destType -n destName
For example, the following command displays information about the queue destination curlyQueue:
imqcmd query dst -t q -n curlyQueue -u admin
Example 7–3 shows an example of the resulting output. You can use the imqcmd update dst subcommand (see Updating Physical Destination Properties) to change the value of any of the properties listed.
|
For destinations in a broker cluster, it is often helpful to know how many messages in a destination are local (produced to the local broker) and how many are remote (produced to a remote broker). Hence, imqcmd query dst reports, in addition to the number and total message bytes of messages in the destination, the number and total bytes of messages that are sent to the destination from remote brokers in the cluster.
For topic destinations, imqcmd query dst reports the number of publishers that are wildcard publishers (including their corresponding symbolic destination names) and the number of subscribers that are wildcard subscribers (including their symbolic destination names), if any.
To display metrics information about a physical destination, use the imqcmd metrics dst subcommand:
imqcmd metrics dst -t destType -n destName [-m metricType] [-int interval] [-msp numSamples]
The -m option specifies the type of metric information to display:
ttl (default): Messages and packets flowing into and out of the destination and residing in memory
rts: Rate of flow of messages and packets into and out of the destination per second, along with other rate information
con: Metrics related to message consumers
dsk: Disk usage
The -int and -msp options specify, respectively, the interval (in seconds) at which to display the metrics and the number of samples to display in the output. The default values are 5 seconds and an unlimited number of samples.
For example, the following command displays cumulative totals for messages and packets handled by the queue destination curlyQueue:
imqcmd metrics dst -t q -n curlyQueue -m ttl -u admin
Example 7–4 shows an example of the resulting output.
|
For a more detailed description of the use of the Command utility to report physical destination metrics, see Physical Destination Metrics.