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. Detailed information about the exact configuration is provided in the documentation about the above functionalities.
General
The Event Monitor monitors Console and FileSystem events and forwards them to the Automation Engine. You can react to them via Event objects. Events are only monitored when the Event Monitor is active. Events are collected on the basis of SMF records via an SMF exit. This Exit is able to 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 (its size is definable).
The System Management Facility (SMF) is also used in other fields. It recognizes job ends and GDGs, for example.
The following illustration shows the interaction of agent, Event Monitor and SMF Exit.
The SMF Exit stores events in an Area Data Space (CADS). The z/OS Console shows the CADS filling level colored:
- 25%, 50% and 75% in white
- 80%, 85%, 90%, 95% and 100% in red
The SMF Exit cannot store events if the CADS is full. The oldest event entry is not overwritten. Events are stored in the CADS again as soon as memory has become available. This is the case when the SMF Exit transmits events to the Event Monitor.
The default value for the CADS is 10 MB which is sufficient for storing about 65000 events.
Events occurring during a startup, shutdown or IPL stage are not collected. Events are processed as soon as the Event Monitor has started.
Configuration
Start the SMF Exit as shown below:
- Make sure in your z/OS system that the SMF subsystem logs all SMF records of type 14, 15, 30 and 64 and that the exits IEFU83 and IEFU84 are active.
- The SMF Exit can run as a subtask of the agent or Event Monitor which requires their INI files to be adjusted as shown below:
Enter a description for the SMF Exit in the section (CONSOLE), parameter ModulName=.
Define the CADS size in the section (CONSOLE), parameter SMF_Buffersize=. The default size is 10 MB.
- Start the Event Monitor.
Starting the Event Monitor
Use the following command to start the Event Monitor including the SMF Exit:
START Name of the Event Monitor
Ending the Event Monitor
Use the following commands to end the Event Monitor and/or the SMF Exit manually:
Command |
Description |
---|---|
MODIFY Name of the Event Monitor,END |
Ends the Event Monitor, the SMF Exit remains active |
STOP Name of the Event Monitor |
Ends the Event Monitor and the SMF Exit |
MODIFY Name of the Agent,SHUTDOWN |
Ends all Event Monitors including SMF Exits which are connected to the agent. The agent then ends itself. |
The SMF Exit always remains active when an Event Monitor is canceled.
Warm Start
The SMF Exit remains active when the Event Monitor is ended manually ("END") or aborts. As soon as the Event Monitor has been restarted, it connects to the SMF exit again and processes the events which have accumulated meanwhile.
INI-file modifications in the parameters ModulName= and SMF_Buffersize= have no effect. Values are only read when the SMF Exit is started again.
Exceptions
The SMF Exit usually ends when the Event Monitor is ended with SHUTDOWN. The CADS is automatically deleted. However, you can also end the SMF Exit manually:
SET PROG,EXIT,DELETE,EXITNAME=Name of the SMF Exit,MODULNAME=Name of the UC4 module
The CADS is not deleted if the SMF Exit is ended 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 also must specify the AE system and the eyecatcher name. These values are defined in the system= and CADSEyeCatcher= parameters in the INI file of the Event Monitor. By default, the CADSEyeCatcher name is the LPAR name.
Call the CADSDEL utility 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>
Verify that the CADS has been deleted with the z/OS command D A,*MASTER*.
Scenario
There are two LPARs in Sysplex:
- The first one includes an agent and an Event Monitor. Both run as independent tasks. The SMF Exit is a subtask of the Event Monitor.
- The second one also includes an Event Monitor with an SMF Exit running as a subtask.
LPAR1 |
LPAR2 |
---|---|
Agent: MVS01 |
|
Event Monitor: EM01 |
Event Monitor: EM01 |
The following configurations are required in LPAR1:
- Install an agent in LPAR1 as described in the Installation Guide. The complete section (CONSOLE) in the agent's INI file must be commented out because the Event Monitor should run with the SMF Exit as an independent started task.
;(CONSOLE)
;start=
;buffersize=
;smfwrite=
;ModulName=
;smfStepFilter=
;smfJob=
;SMF_Buffersize=
;ABENDNUM=
- Install the Event Monitor as an independent started task in LPAR1. The corresponding description is also found in the Installation Guide. The section (CONSOLE) in the Event Monitor's INI file must be adjusted because the SMF Exit is a subtask of the Event Monitor:
(CONSOLE)
smfwrite=1
ModulName=SMFE01
smfStepFilter=0
SMFJob=0
SMF_Buffersize=10
The following configurations are required in LPAR2:
- Install the Event Monitor as an independent started task in LPAR2. Adjust the section (CONSOLE) in the Event Monitor's INI file because the SMF Exit is also a subtask of the Event Monitor:
(CONSOLE)
smfwrite=1
ModulName=SMFE01
smfStepFilter=0
SMFJob=0
SMF_Buffersize=10
See also: