Menu

zPulse · Tape

Tape mount analysis on z/OS: what SMF 21 tells you

SMF 21 records each tape demount with its volume, drive and error counts. See what it brings to tape mount analysis on z/OS, and what you need beside it.

SMF 21 tells you that a tape volume was demounted, on which drive, and how many read errors, write errors and start subchannel operations it saw while mounted. For tape mount analysis on z/OS it gives a count per volume and drive, but not the wait of the job nor what happened inside a virtual tape library.

This article explains what an SMF 21 record contains, how to count mounts with it, where its limits are, and which other sources complete the picture.

What SMF 21 is

SMF record type 21 (X’15’) is the Error Statistics by Volume record, or ESV. z/OS writes it when a data set on magnetic tape is demounted. It holds statistics for the whole volume over the time it was mounted, however many data sets were read or written and however many times they were closed.

The IFHSTATR utility formats and prints these records. Many sites also load them into their own performance database, next to the other SMF types.

One detail matters for counting: a type 21 record is also written when EREP runs and when EOD is issued. More than one record can exist for a single mount.

What an SMF 21 record contains

The record describes a volume and the drive it was mounted on. The table below groups its content by use.

What an SMF 21 record contains
Content What it tells you Use in tape mount analysis
Volume serial Which tape volume was mounted The volumes mounted most often, repeated mounts of the same volume
Device number and unit type Which drive, and which device type Mounts per drive and per device type, real or virtual
Tape format How the volume was recorded Separating media generations
Temporary and permanent read and write errors How the volume and drive behaved Failing media or drives, before they cause job failures
Start subchannel (SSCH) count How much I/O the mount carried Short mounts with little I/O against heavy ones
Noise blocks, erase gaps, cleaner actions The physical condition of media and drive Maintenance of real tape drives
Record date and time When the demount happened Mounts per hour, and the peaks of the day
Diagram of an SMF 21 record (Error Statistics by Volume): identity, error, activity and time fields, next to the three moments z/OS writes it: a tape demount, an EREP run, an EOD command. More than one record can exist for a single mount.

Free study

See your own tape activity in zPulse

Send us your RMF or CMF tape reports, VEHSTATS files and tape catalogue reports. A Technical Storage expert runs them through zPulse Tape and walks you through mounts, cache and fill rates.

Counting mounts with SMF 21

A mount count from SMF 21 is simple in principle: one demount, one record. In practice, four steps keep the count honest:

  1. Remove the extra records written by EREP runs and EOD, so that each mount counts once.
  2. Split by device type, so that virtual and real drives are not added together.
  3. Count per system, then add up: each LPAR writes its own records.
  4. Count per hour, not per day. Mount peaks during the batch window are what drive the number of drives you need.

The result answers questions such as “how many mounts per hour during the night?” or “which volumes are mounted again and again?”. It is a good start for a tape mount analysis, and often the first evidence that a workload should move from real to virtual tape, or the other way round.

What SMF 21 does not tell you

SMF 21 is about volumes and drives. Several questions of a full tape mount analysis need other data:

  • Who asked for the mount. Correlate with job and data set records (SMF 30, 14 and 15) or with your tape management system.
  • How long jobs waited for mounts. The ESV record has no wait time. The RMF device activity report shows the share of time a tape device spent with a mount pending (% MT PEND).
  • What happened inside a virtual tape library. On a TS7700, SMF 21 describes the virtual volume. Whether the mount was a cache hit or needed a recall from physical tape is in the library’s own statistics.
  • What is on the tapes. Active and scratch volumes, file counts and fill rates come from the tape management catalogue.

Other sources for a complete picture

Other sources for a complete picture
Source What it adds
SMF 21 Demounts per volume and drive, with error counts
SMF 30, 14 and 15 The job and the data sets behind each mount
RMF Magnetic Tape Device Activity (CMF Tape Activity Report) Activity and response time per tape device and interval
TS7700 statistics, retrieved with BVIR and reported by VEHSTATS Virtual and physical mounts per cluster, cache use and throttling, virtual drives
Tape management catalogue (DFSMSrmm, CONTROL-T, CA-1) Active and scratch volumes, file counts, capacity and fill rate

The TS7700 keeps point-in-time and historical statistics. The BVIR facility retrieves them to the host, and the IBM Tape Tools utility VEHSTATS turns the historical statistics into reports on mounts, data transfer and use of the library.

Five source cards for tape mount analysis: SMF 21 and SMF 30, 14 and 15, marked not read by zPulse; the RMF Magnetic Tape Device Activity report, TS7700 VEHSTATS files and tape catalogue reports, marked read by zPulse Tape.

How zPulse approaches tape

Let us be precise: zPulse does not read SMF 21, nor any raw SMF record. zPulse Tape works from the reports that already summarise tape activity:

  • RMF Magnetic Tape Device Activity or CMF Tape Activity Report. zPulse charts virtual tape mounts per LPAR over time, with a filter by device type, and the virtual tape I/O by LPAR with its response, connect, disconnect, IOSQ and pending time.
  • VEHSTATS files from a TS7700. The VEHSTATS Report tool shows, among other tabs, mounts, physical mounts, cache throttling, the cluster overview and virtual drives.
  • Tape management catalogue reports from DFSMSrmm, CONTROL-T or CA-1. A tape study shows active and scratch volumes and the used and free capacity for each tape type.

A scheduled tape study can send a standard report with the catalogue charts, a tape performance mail and a VEHSTATS mail, each with the covered period in its subject. The zPulse overview shows how tape fits with the Disk, CPU and Space modules.

To see this on your own data, request a free study: send your tape reports, VEHSTATS files and catalogue reports, and a Technical Storage expert walks you through the results.

Frequently asked questions

Does SMF 21 count tape mounts?

Indirectly. SMF 21 is written when a tape volume is demounted, so counting the records approximates the number of mounts. It is also written when EREP runs or when EOD is issued, so remove those extra records before you count.

Can SMF 21 show physical mounts inside a TS7700?

No. On virtual tape, SMF 21 describes the virtual volume seen by z/OS. Physical mounts and recalls inside the TS7700 come from its own statistics, retrieved with BVIR and reported with tools such as VEHSTATS.

Does SMF 21 tell me which job asked for the mount?

SMF 21 is a volume and drive record. To link a mount to a job, correlate it with job and data set records such as SMF 30, 14 and 15, or with your tape management system.

Does zPulse read SMF 21?

No. zPulse reads no raw SMF records. For tape it reads the RMF or CMF tape device activity reports, TS7700 VEHSTATS files and tape management catalogue reports from DFSMSrmm, CONTROL-T or CA-1.

Sources

  1. Record type 21 (X'15'), Error Statistics by Volume, in z/OS MVS System Management Facilities (SMF), IBM
  2. z/OS Resource Measurement Facility Report Analysis, IBM
  3. VEHSTATS user manual, IBM Tape Tools, IBM
  4. TS7700: Starting with VEHSTATS, IBM

About the author

Founder, Technical Storage · z/OS storage performance

Founder of Technical Storage, the z/OS storage performance company behind zPulse. Measuring mainframe Disk, Tape and CPU workloads since 1997.

Keep reading