Use IBM MQ trace
We can record performance statistics and accounting data for IBM MQ by using the IBM MQ trace facility. Use this topic to understand how to control IBM MQ trace.The data generated by IBM MQ is sent to:
- The System Management Facility (SMF), specifically as SMF record type 115, subtypes 1 and 2 for the performance statistics trace
- The SMF, specifically as SMF record type 116, subtypes zero, 1, and 2 for the accounting trace.
If you prefer, the data generated by the IBM MQ accounting trace can also be sent to the generalized trace facility (GTF).
Starting IBM MQ trace
We can start the IBM MQ trace facility at any time by issuing the IBM MQ START TRACE command.Accounting data can be lost if the accounting trace is started or stopped while applications are running. To collect accounting data successfully, the following conditions must apply:
- The accounting trace must be active when an application starts, and it must still be active when the application finishes.
- If the accounting trace is stopped, any accounting data collection that was active stops.
We can also start collecting some trace information automatically if we specify YES on the SMFSTAT (SMF STATISTICS) and SMFACCT (SMF ACCOUNTING) parameters of the CSQ6SYSP macro. These parameters are described in Use CSQ6SYSP.
Before starting an IBM MQ trace, read Use System Management Facility.
Control IBM MQ trace
To control the IBM MQ trace data collection at start-up, specify values for the parameters in the CSQ6SYSP macro when you customize IBM MQ. See Use CSQ6SYSP for details.We can control IBM MQ tracing when the queue manager is running with these commands:
- START TRACE
- ALTER TRACE
- STOP TRACE
We can choose the destination to which trace data is sent. Possible destinations are:
- System Management Facility
- Generalized Trace Facility (accounting trace only)
- Serviceability routine for diagnostic use by IBM service personnel
For daily monitoring, information is sent to SMF (the default destination). SMF data sets typically contain information from other systems; this information is not available for reporting until the SMF data set is dumped.
We can also send accounting trace information to the GTF. This information has an event identifier of 5EE. The The MQI call and user parameter, and z/OS generalized trace facility (GTF) describes how to deal with IBM MQ trace information sent to the GTF.
For information about IBM MQ commands, see MQSC commands.
Effect of trace on IBM MQ performance
Use the IBM MQ trace facility can have a significant effect on IBM MQ and transaction performance. For example, if you start a global trace for class 1 or for all classes, it is likely to increase processor usage and transaction response times by approximately 50%. However, if you start a global trace for classes 2 - 4 alone, the increase in processor usage and transaction response times is likely to be less than 1% additional processor cost to the cost of IBM MQ calls. The same applies for a statistics or accounting trace.Parent topic: Introduction to monitoring IBM MQ for z/OS