Use System Management Facility

We can use SMF to collect statistics and accounting information. To use SMF, certain parameters must be set in z/OS and in IBM MQ .

System management facility (SMF) is a z/OS service aid used to collect information from various z/OS subsystems. This information is dumped and reported periodically, for example, hourly. We can use SMF with the IBM MQ trace facility to collect data from IBM MQ. In this way we can monitor trends, for example, in system utilization and performance, and collect accounting information about each user ID using IBM MQ.

To record performance statistics (record type 115) to SMF specify the following in the SMFPRMxx member of SYS1.PARMLIB or with the SETSMF z/OS operator command.
SYS(TYPE(115))
To record accounting information (record type 116) to SMF specify the following in the SMFPRMxx member of SYS1.PARMLIB or with the SETSMF z/OS operator command.
SYS(TYPE(116))

To use the z/OS command SETSMF, either PROMPT(ALL) or PROMPT(LIST) must be specified in the SMFPRM xx member. See the z/OS MVS Initialization and Tuning Reference and the z/OS MVS System Commands manuals for more information.

We can start collecting some trace information automatically if we specify YES on the SMFSTAT (SMF STATISTICS) and SMFACCT (SMF ACCOUNTING) parameters of the CSQ6SYSP macro; this is described in Use CSQ6SYSP.

Specify YES on the SMFSTAT and SMFACCT parameters enables you to collect trace information as a queue manager starts.

We can also start collection of the data when the queue manager is running with the START TRACE command, specifying START TRACE(A) or START TRACE(S).

We can turn on or off the recording of accounting information at the queue or queue manager level using the ACCTQ parameter of the DEFINE QLOCAL, DEFINE QMODEL, ALTER QLOCAL, ALTER QMODEL, or ALTER QMGR commands. See MQSC commands for details of these commands.

We can control the collection of channel accounting data at the channel or queue manager level using the STATCHL parameter of the DEFINE CHANNEL, ALTER CHANNEL or ALTER QMGR commands.

We can specify the interval at which IBM MQ collects statistics and accounting data in one of two ways:

SMF must be running before we can send data to it. For more information about SMF, see the MVS System Management Facilities (SMF) manual.

For the statistics and accounting data to be reset, at least one MQI call must be issued during the accounting interval.


Allocating additional SMF buffers

When you start a trace, we must ensure that you allocate adequate SMF buffers. Specify SMF buffering on the VSAM BUFSP parameter of the access method services DEFINE CLUSTER statement. Specify CISZ(4096) and BUFSP(81920) on the DEFINE CLUSTER statement for each SMF VSAM data set.

If an SMF buffer shortage occurs, SMF rejects any trace records sent to it. IBM MQ sends a CSQW133I message to the z/OS console when this occurs. IBM MQ treats the error as temporary and remains active even though SMF data can be lost. When the shortage has been alleviated and trace recording has resumed, IBM MQ sends a CSQW123I message to the z/OS console.


Reporting data in SMF

We can use the SMF program IFASMFDP to dump SMF records to a sequential data set so that they can be processed.

There are several ways to report on this data, for example:

  • Write an application program to read and report information from the SMF data set. We can then tailor the report to fit your exact needs.
  • Use Performance Reporter to process the records. For more information, see Use other products with IBM MQ.

Parent topic: Introduction to monitoring IBM MQ for z/OS