System Management Facility (SMF) Exit

The SMF subsystem collects and logs information about the system and its Jobs.

The z/OS Agent and its Event Monitors use SMF records in the following areas:

A requirement for SMF usage is that your z/OS system accepts the relevant system exits and that the SMF module logs particular entries. The INI files of the Agent and Event Monitors contain some settings for SMF. See the links above for configuration details.

This page includes the following:

Introduction

The Event Monitor monitors CONS and FILE events and forwards them to the Automation Engine. You can react to them through Event objects. Events are only monitored when the Event Monitor is active. Events are collected based on SMF records via an SMF Exit. This Exit can buffer events even if the Event Monitor is not available and transmits the collected events to the Event Monitor after a restart. No SMF records are lost unless the buffer is full

The following illustration shows how the Agent, Event Monitor and SMF Exit communicate with each other:

Configuring the SMF Exit

  1. In your z/OS system, make sure that the SMF subsystem logs all SMF records of type 14, 15, 64 for FILE events, and 30 mainly for Job tracking, and that the exits IEFU83 and  IEFU84 are active.
  2. Adjust the behavior of the SMF Exit in the INI file of the Event Monitor:
    • Enter a description for the SMF Exit in the [CONSOLE] section, parameter modulName=.
    • Define the common area data space (CADS) size in [CONSOLE] section, SMF_Buffersize= parameter. The default size is 10 MB, you can store about 65000 events with this value.

The SMF Exit stores events in a CADS. The z/OS Console shows the CADS filling level as follows:

  • White: 25%, 50% and 75%
  • Red: 80%, 85%, 90%, 95% and 100%

Important!

  • The SMF Exit cannot store events if the CADS is full. This means that even the oldest event entry is kept and not overwritten. As soon as the SMF Exit transmits events to the Event Monitor, the memory becomes available and events can be stored in the CADS again.
  • Events that occur during a startup, shutdown, or initial program loading (IPL) phase are not collected. They will be processed as soon as the Event Monitor is active again.

Starting the Event Monitor

The following command starts the Event Monitor including the SMF Exit:

  • STARTName of the Event Monitor

Ending the Event Monitor

The following Console commands end the Event Monitor and/or the SMF Exit:

  • MODIFY Name of the Event Monitor,END
  • Ends the Event Monitor, the SMF Exit remains active

  • STOPName of the Event Monitor
    MODIFYName of the Event Monitor,SHUTDOWN
  • Ends the Event Monitor and the SMF Exit

  • MODIFYName of the Agent,SHUTDOWN
  • Ends all Event Monitors that are connected to the Agent through TCP/IP, including SMF Exits. Finally, the Agent then ends itself.

Note: The SMF Exit always remains active when an Event Monitor ends.

Warm Start

The SMF Exit remains active when you end the Event Monitor manually (END) or when it aborts. As soon as the Event Monitor has been restarted, it connects to the SMF Exit again and processes the events that have accumulated meanwhile.

Important! INI file modifications in the parameters ModulName= and SMF_Buffersize= have no effect. Values are only read when the SMF Exit has started again.

Exceptions

The SMF Exit usually ends when you end the Event Monitor with the SHUTDOWN command. If the SMF Exit is not removed properly, you can use the following command to de-register it manually:

SET PROG,EXIT,DELETE,EXITNAME=Name of the SMF Exit,MODULNAME=Name of the UC4 module

Important! The CADS is not deleted when you end the SMF Exit manually.

Use the CADSDEL utility to delete the CADS content. To do so, you need the information from the STOKEN and TCBTOKEN parameters from the Event Monitor's log file, for example:

-UC4 STOKEN=8000160200001328;TCBTOKEN=00000004000000010000000000FD2300

You must also specify the AE system and the eyecatcher name. These values are defined in the system= and CADSEyeCatcher= parameters in the INI file of the z/OS Event Monitor. By default, the CADSEyeCatcher name is the LPAR name.

Call the CADSDEL utility by using the four parameters.

Example

  • STOKEN= 8000160200001328
  • TCBTOKEN= 00000004000000010000000000FD2300
  • system= UC4PROD
  • CADSEyeCatcher= UC4EYEC

//CADSDEL JOB ####,PROGRAMMER,NOTIFY=&SYSUID,MSGLEVEL=(1,1)

//CADSDEL EXEC PGM=CADSDEL,

//  PARM='8000160200001328 00000004000000010000000000FD2300 UC4PROD UC4EYEC'

//STEPLIB DD DISP=SHR,DSN=<UC4.LOADLIB>

Use the z/OS command D A,*MASTER* to delete the CADS.

Scenario

Let's assume that SYSPLEX includes two local partitions (LPAR), both LPARs must run an Event Monitor. LPAR1 runs an Agent and an Event Monitor as two separate started tasks. LPAR2 runs an Event Monitor with an SMF Exit as a started task.

LPAR1

Agent: MVS01
Event Monitor: EM01
SMF Exit: UC4EXIT

LPAR1 requires the following configurations:

  • Install the Event Monitor as a started task in LPAR1 as described Installing the Agent for z/OS. Adjust the CONSOLE section in the Event Monitor's INI file:

    (CONSOLE)
    smfwrite=1
    modulName=UC4EXIT
    smfStepFilter=0
    SMFJob=0
    SMF_Buffersize=10

LPAR2

Event Monitor: EM02
SMF Exit: UC4EXIT

LPAR2 requires the following configuration settings:

  • Install the Event Monitor as a started task in LPAR2. Adjust the CONSOLE section in the Event Monitor's INI file in the same way as in LPAR1.

See also: