Installation step 9: Record Db2 data to SMF (optional)

When you install Db2, you can specify whether Db2 statistical, accounting, and audit trace data is to be collected.

Procedure

To specify the data that is to be collected:

  1. Choose from the following options:
    Option Description
    To have Db2 collect statistical information Accept the default (YES class 1) for the SMF STATISTICS option on installation panel DSNTIPN. To collect statistical information for deadlock or timeout, specify class 3. To collect information about DDF error conditions, specify class 4.
    To have Db2 collect accounting information Accept the default (1) or specify * (all classes) for the SMF ACCOUNTING option on installation panel DSNTIPN.
    To have Db2 collect auditing information Specify * (all classes) for the AUDIT TRACE option on installation panel DSNTIPN.

    In all cases, Db2 invokes a trace, passing the data it collects to the System Management Facility (SMF) of z/OS®.

    Db2 also passes performance data to SMF whenever an accounting, statistics, or audit trace is successfully started or stopped. Db2 can also record other performance data. After you complete the installation process, you can use commands to have Db2 record performance data for subsystem events.

  2. If, during installation, you requested that Db2 pass accounting and statistics data to SMF, update the SMFPRMxx member of SYS1.PARMLIB as follows:
    • Specify the ACTIVE parameter.
    • Specify STC,NODETAIL for the SUBSYS parameter.
    • Specify the proper TYPE subparameter of the SYS and SUBSYS parameters.

What to do next

During Db2 execution, you can use the SMF SET or SS command to alter the SMF parameters. For example, you can record the statistics trace class 1 IFCIDs 0001, 0002, and 0202 (SMF record type 100); accounting trace class 1 IFCIDs 0003 and 0239 (SMF record type 101); and all other Db2 trace records (SMF record type 102) to SMF. To record this information, issue the following command:
SYS(TYPE(100:102))
For Db2 to pass data to SMF, you must allocate an adequate supply of SMF buffers. The default buffer settings are probably insufficient.

You can specify SMF buffering on the VSAM BUFSP parameter of the Access Method Services DEFINE CLUSTER statement. Do not use the default settings if Db2 data is sent to SMF. Specify CISZ(4096) and BUFSP(81920) on the DEFINE CLUSTER statement for each SMF VSAM data set. These values for CISZ and BUFSP are the minimum requirement for Db2. You might need higher values for CISZ and BUFSP, depending on the requirements of all your z/OS subsystems.

You can also code an IEFU84 SMF exit routine to process the records that are produced.