[z/OS]

Commands required to collect SMF type 115 and type 116 records

Use this topic as a reference for the commands needed to collect type 115 and type 116 SMF records.

Using the START TRACE command

Use the dynamic version of the START TRACE command with the following options to collect the records:
  • START TRACE(STAT) DEST(SMF) CLASS(*) and START TRACE(ACCTG) DEST(SMF) CLASS(*) starts traces for classes 1 to 3
  • START TRACE(STAT) DEST(SMF) CLASS(4) and START TRACE(ACCTG) DEST(SMF) CLASS(4) starts channel initiator statistics and channel accounting data respectively.

    See Planning for channel initiator SMF data for more details on the class 4 channel initiator information.

  • START TRACE(STAT) DEST(SMF) CLASS(5) starts queue statistics.
Attention: If you are using the console version of the command add cpf to the start of the command you issue.

For the CLASS(4) channel statistics, you need to set the STATCHL attribute on the CHANNEL definition. For more information, see Controlling channel statistics collection.

For the CLASS(5) queue statistics, you need to set the STATQ attribute on the QUEUE and/or QMGR definition. For more information, see Controlling queue statistics collection.

SMF type 115 records - IBM MQ statistics

To verify the current statistics gathering, issue the DISPLAY TRACE command DISPLAY TRACE(STAT). You should see the following:

RESPONSE=MPX1  
 CSQW127I QML1 CURRENT TRACE ACTIVITY IS -
 TNO TYPE  CLASS        DEST        USERID  RMID
 02  STAT  01,02,03,04  SMF          *      *    
 END OF TRACE REPORT    
Note: Setting the ZPARM SMFSTAT or ZPARM SMFACCT attribute to an asterisk now only controls classes 1, 2 and 3. You must turn on classes 4 and 5 using the START TRACE command.

SMF type 116 Class 3 & 4 data – IBM MQ task and channel accounting records

To verify the current accounting trace data collection, issue the DISPLAY TRACE command DISPLAY TRACE(ACCT). You should see the following:

RESPONSE=MPX1  
 CSQW127I QML1 CURRENT TRACE ACTIVITY IS -
 TNO TYPE  CLASS        DEST        USERID  RMID
 03  ACCTG  *           SMF          *      * 
 05  ACCTG  04          SMF          *      *   
 END OF TRACE REPORT
 CSQ9022I QML1 CSQWVCM1  'DISPLAY TRACE'  NORMAL COMPLETION 
    
You can turn SMF116 data collection on and off dynamically as there is no cycle of the queue manager necessary, using the following commands:

START TRACE(ACCTG) DEST(SMF) CLASS(3)
START TRACE(ACCTG) DEST(SMF) CLASS(4)

STOP TRACE(ACCTG) DEST(SMF) CLASS(3)
STOP TRACE(ACCTG) DEST(SMF) CLASS(4)
The channel accounting data requires additional set-up to produce the SMF. The steps are:
  • Issue the command to turn on gathering of the information for all sender receiver and client connections:
    ALTER QMGR STATCHL(HIGH)
  • Issue the command to turn on gathering of the information for auto-defined cluster channels if clustering is in use:
    ALTER QMGR STATCLS(HIGH)
    Note: In the preceding statements, the value of HIGH, MED, or LOW have the same effect.
  • Verify that all channels have STATCHL set to QMGR:
    DISPLAY CHANNEL(*) STATCHL

Verifying the STATIME

Attention: You should set the interval to be no more than fifteen minutes using the SET SYSTEM command, although the default is 30 minutes, because a shorter interval is advised.
If you are evaluating a queue sharing group (QSG), ensure that the STATIME is consistent across the QSG.
  • Display the system settings using the following DISPLAY SYSTEM command:
    DISPLAY SYSTEM
  • If the STATIME value is zero, meaning that the statistics interval is set to the default LPAR value, then this is typically OK.

    There have been instances of very high volume LPARs creating varying durations of the SMF data production. If in your evaluation of the data there have been widely varying durations, set the STATIME to a nonzero value for all queue managers.

  • The following examples set the STATIME interval to five minutes:
    SET SYSTEM STATIME(05) 
    or if at IBM® MQ 9.2.4 or above:
    SET SYSTEM STATIME(05.00)
    Note: The new interval does not take effect until the current interval has elapsed, so you need to make the change prior to the start of data collection.

Verifying the ACCTIME value for queue managers that are at release level IBM MQ 9.2.4 or higher:

  • If ACCTIME is set to -1, it is the same as the STATIME attribute.
  • If this evaluation is for a QSG, ensure that the ACCTIME is consistent across the QSG. If it is not, set the values to be the same interval before starting to gather the data.
  • If the ACCTTIME is set to 30 or above, alter it to be no greater than 15 using the SET SYSTEM command. The following examples set the ACCTIME interval to five minutes:
    SET SYSTEM ACCTIME(05.00)
    Note: The new interval does not take effect until the current interval has elapsed, so you need to make the change prior to the start of data collection.

Verifying the ACCTQ setting on the queue managers

  • Display the ACCTQ setting for the queue managers you are investigating using the following command:
    DISPLAY QMGR ACCTQ
  • If the value is ACCTQ(ON), no further action is needed. Otherwise, issue the following command:
    ALTER QMGR ACCTQ(ON)
  • If clustering is in use, ensure that accounting is turned on for the SYSTEM.CLUSTER.TRANSMIT.QUEUE and any other named cluster transmit queues hosted by the queue manager. To determine whether accounting is enabled for the cluster transmission queues:
    • Display the ACCTQ setting for the queue or queues, using the following command:
      DISPLAY QL(SYSTEM.CLUSTER.TRANSMIT.QUEUE) ACCTQ
    • If the value is ACCTQ(ON), no further action is needed. Otherwise, issue the following command:
      ALTER QL(SYSTEM.CLUSTER.TRANSMIT.QUEUE) ACCTQ(ON)
  • For all other high-volume queues, verify that the value of ACCTQ is ON, or set ACCTG to QMGR.