You are on page 1of 6

z/OS V2R4 MVS System Management Facilities (SMF - ieag200)

1- Introduction to SMF
SMF formats the information that it gathers into system-related records (or job-related records).
System-related SMF records include information about the configuration, paging activity, and
workload. Job-related records include information on the CPU time, SYSOUT activity, and data set
activity of each job step, job, APPC/MVS transaction program, and TSO/E session.

An installation can provide its own routines as part of SMF. These routines will receive control
either at a particular point as a job moves through the system, or when a specific event occurs. For
example, an installation written routine can receive control when the CPU time limit for a job expires
or when an initiator selects the job for processing. The routine can collect additional information, or
enforce installation standards.
1 — Routines (SMF, system, program-product, installation-written) collect and format data into
records and then pass the records to the SMF writer.

2 — In addition to collecting data for SMF, some routines interface with the SMF exits, passing
control to them at several points during job (and job step) processing.

3 — The SMF exits get control when specific events occur, such as when a data set exceeds the
output limit or at designated points during job processing.

4 — SMF routines copy records to SMF buffers and then transfer records from the SMF buffers to
either:

• SMF data sets

• SMF log streams

SMF routines then issue messages to the operator indicating the successful or unsuccessful
completion of specific SMF-related events.

5 — • If you write your SMF data to SMF data sets, the data sets are filled one at a time; while
SMF writes records on one data set, other SMF data sets can be dumped or cleared.

• If you write your SMF data to a log stream, you can keep writing data to your log stream. The
log stream will offload to DASD data sets when the log stream coupling facility structure (or the local
storage buffers for a DASD only log stream) fills. You define the thresholds in the log stream
definition for how much data is held before offload.

6 — The SMF dump programs copy data from either SMF data sets or log streams to tape or
direct access data sets for permanent storage. You can also use the SMF log stream dump program
may to dump to a temporary data set for immediate use.

7 — Analysis and report routines, either user-written or those such as the Tivoli® Decision
Support for z/OS program product, process information records.

2- Setting up and managing SMF

Setting up SMF requires your installation to decide what kind of records it wants SMF to produce
or what information it wants SMF to gather. Then you can make decisions about how to set SMF up
to meet these requirements. Once you've considered some of the basics about what you want SMF
to do in your installation, your next decision is whether you want to write your SMF records to log
streams or to SMF data sets.

• When you use SMF data set recording, SMF writes records to the SMF data sets you allocate.
The size of the data that the system can write to SMF data sets is constrained by the VSAM control
interval size— SMF can only write one control interval at a time.

• When you use SMF logging, SMF writes records to the system logger managed log streams that
you set up. SMF can write much larger chunks of data to the log stream than it can to SMF data sets.
This has the potential to make writing SMF records faster, which could mean collecting more data.

SMF logging also allows you to group different SMF record types into different log streams
defined for different purposes. SMF can also write a single record to multiple log streams.

You can set up either of the following types of log streams:


– Coupling facility log streams, where data is stored in a coupling facility structure and then
offloaded to DASD.

– DASD-only log streams, where data is stored in local storage buffers and then offloaded to
DASD.

It is easy to dynamically switch between SMF data set recording and SMF logging:

• First, set up your SMF configuration in an SMFPRMxx member of parmlib for both SMF data set
recording and SMF logging by defining both SMF data sets ( DSNAME parameter) and SMF log
streams (LSNAME and DEFAULTLSNAME parameters).

• You can then toggle between the two methods using the RECORDING(DATASET | LOGSTREAM)
parameter in the SMFPRMxx member. There are two ways to do this:

– Change the RECORDING parameter in a new SMFPRMxx member, and then issue the SET
SMF=xx command to switch the system to using that SMFPRMxx member.

– Issue the SETSMF RECORDING(DATASET | LOGSTREAM) command to switch to the method


you wish. Note that this method requires that PROMPT(LIST) or PROMPT(ALL) be specified in
the active SMFPRMxx parmlib member to allow use of the SETSMF command.

Tip: Wait—don’t delete those SYSx.MANx data sets!

If you intend to switch from SMF data sets to SMF logging, do not delete any of your SMF data
sets. You should retain these as a fallback option. You can add SMF logging to your SMF data set
configuration in an SMFPRMxx member and dynamically switch between recording to data sets and
log streams.

SMF Recording to Log Stream

For either a coupling facility or a DASD-only log stream, system logger requires that you have SMS
installed and active at your installation. This is true even if you do not use SMS to manage the DASD
log data sets and staging data sets, because system logger uses SMS to allocate data sets, such as the
DASD log stream and staging data sets.

There are two types of log streams, and SMF logging supports both of them:

• Coupling facility log streams, where data is stored in a coupling facility structure and then
offloaded to DASD. A coupling facility log stream is ideal for merging SMF data from multiple
systems.

• DASD-only log streams, where data is stored in local storage buffers and then offloaded to
DASD.

For an SMF log stream, the first 7 characters must be 'IFASMF.'.

When you define log streams to system logger, you must put information into the LOGR and
CFRM couple data sets. Do the following:

• Ensure that you have a formatted LOGR couple data set available. If you use other system
logger applications, such as OPERLOG or LOGREC, the LOGR couple data set will already be available.

• Define the log streams and coupling facility structures (for coupling facility log streams) in the
LOGR policy couple data set using the administrative data utility ( IXCMIAPU) utility.
– For a DASD-only SMF log stream, you must specify the LOGR policy MAXBUFSIZE parameter
to define the maximum log block size, in bytes, that the system can write to the DASD-only log
stream. IBM suggests a MAXBUFSIZE for a DASD-only log stream of 65532.

– For a coupling facility log stream, you must specify the LOGR policy MAXBUFSIZE
parameter to define the maximum log block size, in bytes, that the system can write to the log
stream assigned to the structure you are defining. IBM suggests that you define a MAXBUFSIZE
value between 33024 and 65532.

• Define the coupling facility structures in the CFRM policy couple data set using the IXCMIAPU
utility.

Deleting log streams: Do you want to remove a log stream from use for SMF logging, or do you
want to actually delete the log stream itself?

– To remove a log stream from use in your SMF logging configuration, create a new SMFPRMxx
parmlib member and remove the log stream you no longer wish to use. Then issue the SET SMF=xx
command to switch to using that SMFPRMxx parmlib member.

– To delete a log stream from your installation, you must delete it from the LOGR policy. To
accomplish this you can use either:

- The IXCMIAPU utility for system logger, with DELETE LOGSTREAM NAME(log_stream_name)
parameters

- The IXGINVNT service, with the REQUEST=DELETE TYPE=LOGSTREAM parameters

- The SETLOGR FORCE,DELETE command with the LSN=name parameter

When you set up SMF logging in a multisystem environment, you specify a log stream for each
system. If two or more systems share an SMFPRMxx parmlib member, you can specify symbols in the
log stream name (LSNAME parameter) in SMFPRMxx to allow the systems to specify unique values
based on the system IDs. For example:
LSNAME(IFASMF&SID..PERF,IFASMF.&SID..JOB,)

Suppose the substitution text for the &SID symbol is SYSA on one system and SYSB on the other.
When you IPL system SYSA, the log stream names are:

• IFASMF.SYSA.PERF and IFASMF.SYSA.JOB

• IFASMF.SYSB.PERF and IFASMF.SYSB.JOB

During initialization, SMF searches the SMFPRMxx parmlib member to see whether the system is
using log streams or SMF data sets to record SMF data. If the member specifies
RECORDING(LOGSTREAM), SMF will write the SMF data to the log streams specified on the
DEFAULTLSNAME and LSNAME parameters of the SMFPRMxx member. You can define a default log
stream name on DEFAULTLSNAME, and request particular record types go to particular log streams
using the TYPE subparameter on the LSNAME parameter.

To use SMF logging, you must specify the following parameters in SMFPRMxx:

• RECORDING(LOGSTREAM) to specify that you wish to write SMF data to log streams rather than
SMF data sets.
• LSNAME, to specify a log stream in which you want to write particular SMF record types, specified
on the TYPE subparameter, as follows:
LSNAME(logstreamname,TYPE({aa,bb}|{aa,bb:zz}|{aa,bb:zz,...}),NOBUFFS(MSG|HALT),
BUFUSEWARN(nn),DSPSIZMAX(nnnnM|nG),COMPRESS(PERMFIX(nnnnM)))

• DEFAULTLSNAME, to specify a default log stream to which all SMF data not otherwise specified on
LSNAME parameters will be written.

DEFAULTLSNAME(logstreamname,NOBUFFS(MSG|HALT),BUFUSEWARN(nn),DSPSIZMAX(nnnnM|nG),
COMPRESS(PERMFIX(nnnnM)))

SMF data is maintained in a buffer area before it's written to the log stream. SMF will be triggered to
flush the buffer and "harden" the data to the log stream if any of the following scenarios occur:

• At least a single buffer block is full.

• The time that is coded on the MAXDORM parameter expires.

• In response to a SWITCH SMF.

SMF Recording to Data Sets

To record SMF records in SMF data sets, an installation must allocate direct access space and catalog
the SMF data sets. IBM recommends that you catalog the SMF data sets in the master catalog.

SMF should have a minimum of two data sets for its use, and IBM recommends that you run with a
minimum of three SMF data sets to ensure availability.

Select DASDs that can handle the volume of data that SMF generates at your installation. If the I/O
rate for a device is too slow, SMF places the data it generates in buffers. The buffers will eventually
fill, which could result in lost data. Several factors, such as the specific system configuration, the
amount of SMF data to be written, the size of SMF buffers (the control interval size), and your
installation's report program requirements, determine which device type is most efficient for a
particular installation.

Allocate each SMF data set as a single-extent VSAM cluster on a single volume and catalog it in the
master catalog. Do not specify secondary space for any of the cluster's components. Specify the
same control interval size for all SMF data sets that a particular system will use.

You can specify the data sets to be used for SMF recording on the DSNAME parameter in the
SMFPRMxx parmlib member.

When you set up SMF in a multisystem environment, you might need to specify a recording data set
for each system. If two or more systems share an SMFPRMxx parmlib member, you can specify
symbols in the recording data set name in SMFPRMxx to allow the systems to specify unique values.
For example:
DSNAME(&SID..MAN1,&SID..MAN2,&SID..MAN3)

Suppose the substitution text for the &SID symbol is SYSA on one system and SYSB and the recording
data sets are:

• SYSA.MAN1, SYSA.MAN2 and SYSA.MAN3

• SYSB.MAN1, SYSB.MAN2 and SYSB.MAN3

You might also like