z/OS provides more measurement data than any other operating system, which is one of the great strengths of this platform over others. These measurements allow you to tune the system, debug problems, chargeback for resources, provide management reports to show resource usage and help a capacity planner adequately forecast the future needs. The majority of this wonderful information is written to a data repository by the System Management Facilities (SMF) component. This component is used as a common receptacle of data from other components of z/OS, such as CICS and DB2.
This article provides an introduction to this most important component. A follow-up article will describe the life of an address space, how exits can be used, when type 30 records are created and how they can be used. Additional articles will include more detail on SMF, its parameters, recommendations on SMF file creation and usage, and details about the most important record types.
SMF is a base component of z/OS and has been available for more than 40 years. It provides a set of macros applications can use to pass records to SMF for recording to a data repository. The beginning of all records must conform to a standard format, and each record is identified by a one-character record type (hex value ‘00’ to ‘FF’) between 0 and 255. IBM has exclusive use of record types 0 through 127, and subsystems and applications may use 128 to 255. Applications aren’t forced to use SMF for recording and some don’t (e.g., IMS relies on its logs instead of SMF). Several of the record types also have subtypes, such as the type 30 record, which has subtypes 1 through 6 to identify unique types of records.
The basics and use of SMF are documented in the z/OS System Management Facilities (SMF) manual (see the “Resources” section at the end of this article).
The major elements of SMF are:
- Macros. Applications use several macros to pass information to SMF and to interrogate parameters. The most common of these are the SMFWTM and SMFEWTM macros, which are used to pass records to SMF. These are documented in the SMF manual.
- Parameters. Parameters are used to control how SMF is run and which record types are recorded. The parameters reside in member SMFPRMxx of the system parmlib. They’re documented in the z/OS MVS Initialization & Tuning Reference, although some additional material is also found in the SMF manual. A future article will provide more detail about each SMFPRMxx parameter and give our recommendations.
- Exits. User-written exits are available to interrogate, change or delete records as they’re passed to SMF. These are preferably defined in the PROGxx parmlib member and are documented in the SMF manual. These will be covered in our next article.
- MVS Commands. The default is for SMF to automatically be started following an IPL. If you specify NOACTIVE (meaning SMF shouldn’t be automatically started), you can subsequently start it using the SET SMF command. Additionally, the SETSMF and SET SMF commands can be used to dynamically modify the SMF parameters. The DISPLAY SMF command can display the parameters and output data sets.
Uses of SMF Data
These disciplines make heavy use of SMF data:
- Tuning devices, jobs, network, data sets and workload manager (WLM)
- Managing and reporting resources such as CPU, external storage, memory and connections
- Configuration analysis
- Management reporting
- Problem identification
- Hardware and workload analysis
- Accounting and chargeback to internal or external customers (such as outsourcers)
- Performance and resource management, including:
- Security and auditing issues
- Capacity planning, including the collection of resource data for planning purposes
- Data center reporting
- IBM software license charges, including sub-capacity and usage charges.
Major Record Types
Everyone should be familiar with the major SMF records, but if you’re new to SMF, here’s a shortcut:
- Type 70-79 records are created by the IBM Resource Measurement Facility (RMF) or the BMC Software CMF Monitor and are used to provide performance statistics for z/OS. The type 70 contains CPU and LPAR usage, the type 74 provides (among other things) DASD activity and response times, and the type 72 provides resource usage and response time by service class periods. These three record types and the type 30 records are the most frequently used records in most data centers.
- Type 30 records are created by MVS and are written at key points during the processing of any batch job, TSO user or started task. Our next article will provide more detail about each subtype:
- Subtype 1 is written at the beginning of a job.
- Subtype 2 is written at the end of all but the last interval (if the INTERVAL keyword of the SMFPRMxx parmlib member is turned on).
- Subtype 3 is written at the end of the last interval of a step (if the INTERVAL keyword of the SMFPRMxx parmlib member is turned on).
- Subtype 4 is written at the end of a step.
- Subtype 5 is written at the end of a job.
- Subtype 6 is written at the end of an interval for a system task.
- Type 14-15 records are written when non-VSAM data sets are closed and contain information about the usage of each data set. You can do a lot of performance tuning by analyzing buffer sizes and data set activity with these records.
- Type 42 records are written by the DFSMS component for SMS and non-SMS-managed data sets and controllers.
- Type 60-69 records contain information about VSAM data sets and catalogs, and can be used to tune VSAM files.
- Type 100-102 records are written by DB2 and contain accounting, trace data and performance data.
- Type 110-111 records are written by CICS and provide accounting and performance data.
- Type 113 records are written by Hardware Instrumentation Services (HIS) and provide invaluable hardware data that includes information on the type of workloads you’re running.
- Type 115-116 records are written by WebSphere MQ and provide statistics and accounting data.
- Type 120 records are written by the WebSphere Application Server (WAS) to provide performance data.
If these are on the tip of your tongue, you will be considered an expert!