To display metrics information about a single service, use the metrics subcommand.
This is the syntax of the metrics subcommand:
imqcmd metrics svc -n serviceName [-b hostName:portNumber] [-m metricType ] [-int interval] [-msp numSamples]
The subcommand displays metrics for the specified service on the default broker or on a broker at the specified host and port.
Use the -m option to specify the type of metric to display:
ttl Displays metrics on messages and packets flowing into and out of the broker by way of the specified connection service. (default metric type).
rts Displays metrics on rate of flow of messages and packets into and out of the broker (per second) by way of the specified connection service.
cxn Displays connections, virtual memory heap, and threads.
Use the -int option to specify the interval (in seconds) at which to display the metrics. The default is 5 seconds.
Use the -msp option to specify the number of samples displayed in the output. The default is an unlimited number (infinite).
For example, to get cumulative totals for messages and packets handled by the jms connection service:
imqcmd metrics svc -n jms -m ttl -u admin
After prompting for the password, the command produces output like the following:
------------------------------------------------- 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 |
For a more detailed description of the use of imqcmd to report connection service metrics, see Connection Service Metrics.