Configuring System Management Facility (SMF) files

To configure SMF, you need to configure the server started task JCL, the server configuration member, and the server virtual table member.

About this task

SMF data set names are dynamic in local environments and require SEF rules enablement and optionally Global Variables set to specific values to provide data set names to the virtual tables and views when using SMF data set or logstream configurations.

You should choose either or both GDG Name support or Dynamic Data Set Name support to quickly access your SMF data for testing access. These two options are provided for your convenience to get you started accessing your SMF data. Custom rules may need to be developed for your use with utilizing your local naming convention to provide agile access to all your SMF files.

Procedure

  1. Configure the server started task JCL. Concatenate the hlq.SAZKSMAP data set to the AZKMAPP DD statement to add all maps for SMF.
  2. Customize the server configuration member. To enable virtual table rule events, configure the SEFVTBEVENTS parameter in the AZKSIN00 member, as follows:

    "MODIFY PARM NAME(SEFVTBEVENTS) VALUE(YES)"

    Verify the VTB ruleset name:

    "DEFINE RULESET NAME(VTB)" 
           "RULETYPE(VTB)" 
           "DSNAME('"||SHLQ2||".SAZKXVTB')"

    If there were any changes to AZKSIN00, recycle the server started task.

  3. To use real-time SMF, add the following statements to the AZKSIN00 member after the GLOBAL PRODUCT OPTIONS statement.
    Note: You must have the SMFPRMxx parmlib member configured to use logstreams and in-memory resources.
    IF DoThis
      THEN DO
        "DEFINE SMF NAME(IFASMF.INMEM)",
        "BUFSIZE(500)",
        "TIME(0)" 
    END

    The BUFSIZE parameter is specified in megabytes. It indicates how much SMF data will be retained in memory for queries. If the buffer fills up, the oldest data will be discarded. In parallel, SMF is recording these records to a logstream.

    The TIME parameter is specified in minutes. It indicates how long to keep SMF data in memory. Older data will be discarded. Specifying 0 indicates no time limit, and data will be retained until the buffer fills up.

  4. Optional: Enable SMF using GDG Naming.
    1. Enable the Server Event Facility rule AZKSMFT2 in the VTB ruleset using ISPF option SEF Rule Management with the SMF dump data set, the logstream data set, or the in-memory resource name. You can choose to activate all three options by customizing the rule.

      The VTB rule can select from a GDG data set, any SMF dump data set, a logstream data set, or the in-memory stream.

      1. In the IBM z/OS Platform for Apache Spark - Primary Option Menu, select option E for Rules Mgmt.
      2. Select option 2 for SEF Rule Management.
      3. Enter VTB for Display Only the Ruleset Named.
      4. Enable the rule by entering E and ENTER. Set this to Auto-enable by using A and ENTER.

        Setting the rule to Auto-enable causes the rule to be active when the server is re-started.

    2. Review the information in the AZKSMFT2 rule for the instructions on setting Global Variables that will be used by the rule. Navigate one screen back on the ISPF panel or start over by going to option E (Rules Mgmt) and 1 (Global Variables). In this Global Variable display, select the following:
      1. Change Global Prefix to GLOBAL2.
      2. Select SMFTBL2 by entering S next to the SMFTBL2 data set.
      3. GDGBASE and DEFAULT should have corresponding SMF dump data set names if used.
      4. IM should have its corresponding SMF in-memory name if used.
      5. LOG should have its corresponding SMF logstream name if used.
      Note:

      VTB rules and global variables may be used to reference a GDG data set, any SMF dump data set, logstream data set or the in-memory stream. For example:

      GLOBAL2.SMFGBL2.YESTERDAY = "YOUR.DATASET.SMFDUMP(-1)"

      GLOBAL2.SMFGBL2.M2 = "YOUR.DATASET.SMFDUMP(-2)"

      GLOBAL2.SMFGBL2.M3 = "YOUR.DATASET.SMFDUMP(-3)"

      GLOBAL2.SMFGBL2.M4 = "YOUR.DATASET.SMFDUMP(-4)"

      GLOBAL2.SMFGBL2.M5 = "YOUR.DATASET.SMFDUMP(-5)"

      GLOBAL2.SMFGBL2.IM = "IFASMF.INMEM"

      GLOBAL2.SMFGBL2.IM2 = "IFASMF.INMEM2"

      GLOBAL2.SMFGBL2.LOG = "LOGSTREAM.dataset.name"

  5. Optional: Enable SMF using Dynamic Data Set names.
    1. Enable the virtual table rule AZKSMFT3 to support the ability to pass a dynamic data set name for SMF tables. The table name in the SQL statement must be of the form:
      TableMapName__DataSetName

      Where DataSetName is prefixed by two underscores '__' and the periods in the data set name are replaced with single underscores '_'.

      For example, SELECT * FROM SMF_01400__DATA_SET_NAME would translate into an SQL query of SELECT * FROM SMF_14000 and access the data set DATA.SET.NAME.

    2. Enable the virtual view rules AZKSMFT4 and AZKSMFT5 to support the ability to pass a dynamic data set name for SMF virtual views. The virtual view name in the SQL statement must be of the form:
      ViewMapName__DataSetName

      Where DataSetName is prefixed by two underscores '__' and the periods in the data set name are replaced with single underscores '_'.

      For example, SELECT * FROM SMFV_01400_IFGSMF__DATA_SET_NAME would translate into an SQL query of SELECT * FROM SMFV_01400 and access the data set DATA.SET.NAME.