- z/OS file structures
- DFSMS on z/OS
- Data Class
- Management Class
- Storage Class
- Storage Group
- ACS routines
- z/OS file utilities
- z/OS SMF statistics
- z/OS RMF reporting
SMF provides a powerful way to get details of what is happening in your z/OS 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 can also use the z/OS System Logger to collect data. This method is more flexible and produces the same output than the older method.
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 125 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 z/OS command SET SMF=nn.
Some SMF records that may be of interest to storage people are shown below. These are current for z/OS Version 2 Release 1.
|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 19||Contains DASD volume information|
|Type 21||Contains magnetic tape error statistics|
|Type 30||An SMF type 30 contains hundreds of different accounting records. Some which may be of interest are in offset SMF30OOF, which contains the DASD and TAPE volumes used by a resource in a given time frame.|
|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)
Subtype 15 VSAM RLS Storage Class Response Time Summary
Subtype 16 VSAM RLS Data Set Response Time Summary
Subtype 17 VSAM RLS Coupling Facility Lock Structure Usage
Subtype 18 VSAM RLS CF cache partition usage
Subtype 19 VSAM RLS local buffer manager LRU statistics summary
Subtypes 20/21/24/25 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.
Subtype 24 will show who added or renamed members in a PDS or PDSE.
Subtype 25 shows who renamed a member in 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 ICF catalog 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.|
|Type 240/241||Type 240 and 241 are used for DFHSM records. Record type 240 contains DFHSMShms's Daily Statistics Record. Record type 241 contains DFHSMShms's Function Statistics Record.|
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',
//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 *
(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
Another possibility is Spectrum SMF Writer from Pacific Systems Group. It is completely stand-alone and does not require a SAS license or SAS/MSG to make SMF reports. Pacific Systems Group has user testimonies that say it runs much faster than SAS/MXG. You can get a free 30-day trial from the pacsys.com website
Of course, you could always write your own program. IBM gives you a sample to get you started, called SMFFDRMT.
back to top