Monitoring system resource usage by using the amqsrua command
You can use the amqsrua command to query performance data that is related to the system resource usage of a queue manager.
About this task
You can run the command with just the queue manager name and interactively step through to choose the CLASS, then TYPE and then object parameters that are available for the queue manager at each step. If you know the CLASS, TYPE and object names for which you want to see information, you can specify them when you run the amqsrua command.
By default, the amqsrua program looks for statistics that are published by the queue manager under the topic tree $SYS/MQ/INFO/QMGR. Other components or applications can use a similar mechanism to publish under a different topic starting point. For example, the IBM MQ Bridge to Salesforce that is available on x86-64 Linux® platforms, publishes statistics under $SYS/Application/runmqsfb. From IBM MQ 9.0.2, you can use the -p parameter to specify where amqsrua looks for the statistics for these other components on both Linux and Windows.
- Queue manager name. The queue manager must be running. If you do not specify a queue manager name, statistics for the default queue manager are displayed.
- CLASS name. IBM MQ resource usage publications are
associated with a class. The classes represent the top level in the tree of metadata that describes
the available resource usage information.
- Returns information about CPU usage.
- Returns information about disk usage.
- Returns information about MQI usage.
- Returns information about per-queue MQI usage.
For classes available only with the IBM MQ Bridge to Salesforce, see Monitoring the IBM MQ Bridge to Salesforce.
- TYPE name. IBM MQ resource usage publications are associated with a type within a class. Each publication includes the class and type that allows the class/type/element definitions to be found and the resulting publications to be handled. The class/type/element descriptions are published as metadata at queue manager startup.
- Object name. Resource usage publications are PCF messages that consist of a sequence of PCF elements. The PCF elements that are published for each class/type pair are advertised in the metadata. A leaf is stored in the tree that describes each element, thus allowing the elements to be processed.
- Metadata prefix. Specify a topic tree starting point where amqsrua can look for statistics that are published by queue managers. The default topic tree is $SYS/MQ/INFO/QMGR but other components or applications might publish statistics under a different topic tree starting point, for example, the IBM MQ Bridge to Salesforce publishes statistics under $SYS/Application/runmqsfb.
- Publication count. You can specify how many reports are returned before the command ends. The data is published approximately every ten seconds, so if you enter a value of 50, the command returns 50 reports over 500 seconds. If you do not specify this parameter, the command runs until either an error occurs, or the queue manager shuts down.
From the samples directory, issue the following command to display the available data for the
On Linux, MQ_INSTALLATION_PATH/samp/bin:
./amqsrua -m QMgrNameOn Windows, MQ_INSTALLATION_PATH\tools\c\Samples\Bin64:
amqsrua -m QMgrNameWhere
The following options are available:
- Specifies the name of the queue manager that you want to query. The queue manager must be running.
- If you do not specify a queue manager name, the default queue manager is used.
CPU : Platform central processing units DISK : Platform persistent data stores STATMQI : API usage statistics STATQ : API per-queue usage statistics Enter Class selection ==>
From the list of CLASS options, enter STATMQI.
==> STATMQI CONNDISC : MQCONN and MQDISC OPENCLOSE : MQOPEN and MQCLOSE INQSET : MQINQ and MQSET PUT : MQPUT GET : MQGET SYNCPOINT : Commit and rollback SUBSCRIBE : Subscribe PUBLISH : Publish Enter Type selection ==>
From the list of TYPE options, enter PUT.
==>PUT Publication received PutDate:20170329 PutTime:17045485 Interval:4 minutes,13.978 seconds Interval total MQPUT/MQPUT1 count 22 Interval total MQPUT/MQPUT1 byte count 25284 100/sec Non-persistent message MQPUT count 22 Persistent message MQPUT count 0 Failed MQPUT count 0 Non-persistent message MQPUT1 count 0 Persistent message MQPUT1 count 0 Failed MQPUT1 count 0 Put non-persistent messages - byte count 25284 100/sec Put persistent messages - byte count 0 MQSTAT count 0 Publication received PutDate:20170329 PutTime:17050485 Interval:10.001 seconds Interval total MQPUT/MQPUT1 count 1 Interval total MQPUT/MQPUT1 byte count 524 52/sec Non-persistent message MQPUT count 1 Persistent message MQPUT count 0 Failed MQPUT count 0 Non-persistent message MQPUT1 count 0 Persistent message MQPUT1 count 0 Failed MQPUT1 count 0 Put non-persistent messages - byte count 524 52/sec Put persistent messages - byte count 0 MQSTAT count 0