Navigation Bar

SYSTEM MANAGEMENT FACILITIES (SMF)


Gathering SMF Records
Some SMF Record Types
Reading SMF Records

Gathering SMF Records

SMF provides a powerful way to get details of what is happening in your storage environment. SMF records are cut by the system, and recorded in system files that are usually called SYS1.MANxx. When a SYS1.MAN file fills up, the system switches to an empty one. You will probably have some automation set up to copy the data from the old SYS1.MAN dataset out to a permanent file, then empty the system file ready for the next switch. The names of those copy files will be specific to your site, of course, and it is those files that you need to read to get historical SMF data.

SMF records are not cut automatically; you select the records you want with an entry in SYS1.PARMLIB (SMFPRM00). SMFPRM00 is the default member; you may have a different member as defined in IEASYS00. You select the records you want using the SYS or SUBSYS parameter in SMFPRMnn as shown below. Single records are separated by commas and ranges of records are separated by a colon.

                                                                      
SYS(TYPE(0,6,7,9,11,14,15,17,18,21,22,26,30,32,36:39,
41,42,50,52,60:81,89,99:102,108,110,115,116,118,
128,129,132,199,200,201,203,208,209:211),

The record numbers up to 118 are used by z/OS and are fixed, but any application can write its own records with numbers over 118 using the SMF API. While there is a general understanding that some applications 'own' some of the higher numbers, there is no fixed standard for this; it is up to you to ensure that there is no overlap.
If you change SMFPRMnn, activate it by issuing the OS/390 command SET SMF=nn.

back to top


Some SMF Record Types

Some SMF records that may be of interest to storage people are shown below. These are current for z/OS Version 1 Release 4.

Record Type Description
Type 8 This record identifies each device that is online at IPL time by device class, unit type, and device number.
Type 9/11 Reports on devices being varied online (type 9) or offline (type 11).
Type 14/15 Reports on non-VSAM dataset opens, Type 14 is open for input, and type 15 for output. SMF will write a type 14 record every time a data set is closed, which could happen several times in a job step.
The data the records contain include job, ddname, blocksize, date, opentime, readtime, excpcount, unit address, volser, lrecl, tracks allocated, block size.
Type 17 Written when a DASD dataset is scratched, and includes the data set name, number of volumes, volume serial numbers, job name, date and time.
Type 18 Written when a non-VSAM data set is renamed and contains the old data set name, new data set name, number of volumes, and volume serial numbers.
Type 30 An SMF type 30 subtype 4 record is created at the end of every job step, and among lots of other information, contains the DASD and TAPE volumes used by that step.
Type 36 Identifies that an ICF catalog has been exported successfully and contains the catalog name, the time of export and export job name.
Type 42 The type 42 record contains a wealth of dataset data related to SMS. It is split into several sub-types, some of which are described below.
Subtype 3 is written each time the SMS configuration is changed, either by a VARY SMS command, or an ACTIVATE command.
Subtype 4 collects concurrent copy statistics, and backup statistics for extended sequential data sets.
Subtype 5 gathers storage class VTOC and VVDS I/O statistics.
Subtype 6 records DASD data set level I/O statistics.
Subtype 9 gathers information about space abends (B37/D37/E37), including the dataset which ran out of space, the UCB and the abending job.
Subtype 10 is also a space error, but it refers to dataset allocation failures because a volume selected for allocation does not have sufficient space free.
Subtypes 15/16/17/18/19 gather information about VSAM record-level sharing (RLS), including data set response time, coupling facility (CF) lock structure usage and cache partition usage and Local Buffer Manager LRU Statistics Summary. This data includes information for each system and a sysplex-wide summary.
Subtypes 20/21 relate to PDS and PDSE members. Subtype 20 will show who deleted all members in a PDSE by initialising it. Subtype 21 shows who deleted a member from a PDSE or a PDS.
Type 60 Type 60 records updates to the VSAM volume Dataset (VVDS). Updates are recorded as INSERTED, DELETED or UPDATED. As SMS puts NVR entries into the VVDS for non-VSAM files, this can give you comprehensive audit activity for who has been creating, deleting and updating files. Some of the information this record provides is date, time, jobname, action, filename, volume(s), catalog, sms classes and newname if appropriate.
Type 61/65/66 These all involve IDCAMS VSAM processing. Type 61 is a DEFINE, Type 65 is a DELETE and Type 66 is an ALTER.
Type62/64 These records relate to VSAM component or cluster processing. Type 62 is for a cluster open, and type 64 for a cluster close or volume switch. The records include the catalog and volumes that relate to the cluster, the date and time the cluster was opened, and the job name. The type 64 record also contains information about SMB, NSR and LSR usage.
Type 94 Type 94 writes an hourly record of activity in a system managed tape library. A Virtual Tape System (VTS) will write a Subtype 2 record for specific VTS stats.

back to top


Reading SMF Records

You need a program to read SMF files, you cannot read them directly. The best one I've found is Merrill's MXG SAS code, which extracts and sorts data. Here is some example JCL to extract SMF type 61 65 and 66 VSAM records. The JCL below is executing a catalogued procedure called ASV6, which in turn will invoke a SAS program. If you run SAS, you will probably use a different catalogued procedure name. The 'merrils.config.library' on the EXEC statement is a supplied MXG library that replaces the standard SAS options. Its name will be specific to your site.

//MXGPDB  EXEC ASV8,TIME=20,WORK='200,200',
//  OPTIONS='ERRORABEND',CONFIG='merrils.config.library'
//SMF      DD DISP=OLD,DSN=smf.file.name
//PDB      DD DSN=&&TEMP,SPACE=(CYL,(200,200))
//SOURCLIB DD DISP=SHR,DSN=mxg.library.name
//SYSIN  DD *
%INCLUDE SOURCLIB(TYPE6156);
DATA T1;
 SET PDB.TYPE6156
 (KEEP=JOB SMFTIME SYSTEM ACTION ENTRNAME FUNCTION);

PROC PRINT NOOBS;
//                                                           

Sample output looks like this, tailored a bit to make it fit.

 SMFTIME   SYSTEM  ACTION      ENTRNAME            FUNCTION JOB     
  
04:00:04   LPAA    INSERTED    BB.PROD.G0960V00    SCRATCH  BBLOGPA
04:00:04   LPAA    INSERTED    BB.PROD.G0952V00    CATALOG  BBLOGPA
04:00:06   LPAA    UPDATED     BB.PROD.G0960V00    DEFINE   BBLOGPA
04:00:06   LPAA    DELETED     BB.PROD.G0960V00    DEFINE   BBLOGPA
04:00:06   LPAA    UPDATED     BB.PROD.G0952V00    DEFINE   BBLOGPA

back to top


By entering and using this site, you accept the conditions and limitations of use

 

 

 

Advertising banner for Lasconet