IBM System Management Facilities
IBM System Management Facility (SMF) is a component of IBM's z/OS for mainframe computers, providing a standardised method for writing out records of activity to a file (or data set to use a z/OS term). SMF provides full "instrumentation" of all baseline activities running on that IBM mainframe operating system, including I/O, network activity, software usage, error conditions, processor utilization, etc.
One of the most prominent components of z/OS that uses SMF is the IBM Resource Measurement Facility (RMF). RMF provides performance and usage instrumentation of resources such as processor, memory, disk, cache, workload, virtual storage, XCF and Coupling Facility. RMF is technically a priced (extra cost) feature of z/OS. BMC sells a competing alternative, CMF.
SMF forms the basis for many monitoring and automation utilities. Each SMF record has a numbered type (e.g. "SMF 120" or "SMF 89"), and installations have great control over how much or how little SMF data to collect. Records written by software other than IBM products generally have a record type of 128 or higher. Some record types have subtypes - for example Type 70 Subtype 1 records are written by RMF to record CPU activity.
SMF record types
Here is a list of the most common SMF record types:
- RMF records are in the range 70 through to 79. RMF's records are generally supplemented - for serious performance analysis - by Type 30 (subtypes 2 and 3) address space records.
- RACF type 80 records are written to record security issues, i.e. password violations, denied resource access attempts, etc. Other security systems such as ACF2 also use the type 80 and 81 SMF records.
- SMF type 89 records indicate software product usage and are used to calculate reduced sub-capacity software pricing.
- DB2 writes type 100, 101 and 102 records, depending on specific DB2 subsystem options.
- CICS writes type 110 records, depending on specific CICS options.
- Websphere MQ writes type 115 and 116 records, depending on specific Websphere MQ subsystem options.
- WebSphere Application Server for z/OS writes type 120. Version 7 introduced a new subtype to overcome shortcomings in the earlier subtype records. The new Version 7 120 Subtype 9 record provide a unified request-based view with lower overhead.
The major record types, especially those created by RMF, continue to evolve at a rapid pace. Each release of z/OS brings new fields. Different processor families and Coupling Facility levels also change the data model.
SMF data recording
SMF can record data in two ways:
- The standard and classical way: Using buffers the SMF address space, together with a set of preallocated datasets (VSAM datasets) to use when a buffer fills up. The standard name for the datasets is SYS1.MANx, where x is a numerical suffix (starting from 0).
- The relatively new way: Using log streams. SMF utilizes System Logger to record collected data, which improves the writing rate and avoids buffer shortages. It has more flexibility, allowing the z/OS system to straightforwardly record to multiple log streams, and (using keywords on the dump program) allowing z/OS to read a set of SMF data once and write it many times.
Both the two ways can be declared for the use, but only one is used at a time in order to have the other as a fallback alternative.
This data is then periodically dumped to sequential files (for example, tape drives) using the IFASMFDP SMF Dump Utility (or IFASMFDL when using log streams). IFASMFDP can also be used to split existing SMF sequential files and copy them to other files. The two dump programs produce the same output, so it does not involve changes in the SMF records elaboration chain, other than changing the JCL with the call of the new dump utility.
- IBM z/OS SMF Reference
- Performance Instrumentation Management Techniques wiki (requires "My developerWorks: Sign in" 20090224)
- IBM Redbooks. ABCs of z/OS System Programming Volume 2, International Technical Support Organization, July 2008. 
- BMC CMF Monitor - http://www.bmc.com/products/proddocview/0,2832,19052_19429_23401_1365,00.html
- Examples of SMF Reports - http://www.pacsys.com/smf/smf_example_list.htm