Bus-Tech > Support > MAS Technical Library
Knowledge
Base
Mainframe Appliance for Storage

Extracting MAS Statistics

Since release 4.04, the MAS has collected statistics about data throughput, virtual tape drive usage, and virtual tape volume usage. This tech note describes how to extract the data from the MAS statistics files. The information in this tech note is based on MAS release 5.00-24.

MAS Statistics Files

The MAS statistics are kept in two files.

The first statistics file is /var/bti/stats/hourly. This file contains overall MAS performance statistics. Minute-by-minute read and write byte counts and hourly read and write block counts are maintained, along with statistics such as the number of mounts and peak number of drives in use in each hour.

The second statistics file is /var/bti/stats/vstats. This file contains statistics about every virtual tape mount and unmount, including read and write byte and block counts.

Extraction Utility

The MAS is distributed with a Linux utility program that will extract the statistics to a comma-delimited output format. The format of the statfmt command line is:

statfmt [--help] [--hourly [--minutes]] [--mount] [--unmount] infile

Exactly one of the --hourly (with or without --minutes), --mount, or --unmount options must be specified.

All fields which are either not applicable or not available (see notes below) are output as -1.

The statfmt output is written to stdout.

Hourly Statistics

To extract the hourly statistics, specify the --hourly parameter. In this case the 'infile' parameter must be a MAS hourly statistics file, i.e. /var/bti/stats/hourly.

If the optional --minutes parameter is omitted, the following comma-delimited fields are output to stdout:

  • Date - In the format MM/DD/YYYY.
  • Hour - In the format HH, where HH is 00-23.
  • Mounts - The number of successful mounts performed in this hour.
  • Drives - The maximum number of drives in use at any one time within this hour.
  • BlocksRead - The number of tape blocks read by the host from virtual tapes during this hour. This number does not include tapemarks read. Note 1
  • BlocksWritten - The number of tape blocks written by the host to virtual tapes during this hour. This number does not include tapemarks written. Note 1
  • BytesRead - The number of bytes read by the host from virtual tapes during this hour. This number reflects the uncompressed data delivered to the host.
  • BytesWritten - The number of bytes written by the host to virtual tapes during this hour. This number reflects the uncompressed data delivered from the host.

If the optional --minutes parameter is specified, the following additional comma-delimited fields are output for each minute of the hour, where [MM] is the minute (00-59):

  • BytesRead[MM] - The number of bytes read by the host from virtual tapes during this minute. This number reflects the uncompressed data delivered to the host.
  • BytesWritten[MM] - The number of bytes written by the host to virtual tapes during this minute. This number reflects the uncompressed data delivered from the host.

If no virtual tape activity occurs within a given hour, the statistics record for that hour is omitted.

Volume Statistics

To extract the volume statistics, specify the --mount or --unmount parameter. In either of these cases the 'infile' parameter must be a MAS volume statistics file, i.e. /var/bti/stats/vstats.

Mount Statistics

If the --mount parameter is specified, the following comma-delimited fields are output for each virtual tape mount recorded in the statistics file:

  • Date - In the format MM/DD/YYYY.
  • Time - In the format HH:MM:SS in 24-hour time.
  • Volser - Volume serial number; for scratch tapes, this is the actual volume that was mounted.
  • Device - MAS device name.
  • Error - For a successful mount, this will be zero; for an unsuccessful mount, non-zero.
  • Scratch - For a scratch mount, this will be 1; for non-scratch mounts, this will be zero.
  • Created - If the volume was created in response to the mount request, this will be 1; otherwise, zero.
  • Protected - If the volume was mounted read-only ("ring out"), this will be 1; otherwise, zero.
  • Howlong - How long it took to perform the mount, in milliseconds.
  • Filesize - The size of the virtual tape volume, in bytes, at the time it was mounted.

Unmount Statistics

If the --unmount parameter is specified, the following comma-delimited fields are output for each virtual tape unmount recorded in the statistics file:

  • Date - In the format MM/DD/YYYY.
  • Time - In the format HH:MM:SS in 24-hour time.
  • Volser - Volume serial number; for scratch tapes, this is the actual volume that was mounted.
  • BlocksRead - The number of tape blocks read by the host from this virtual tape during this mounting. This number does not include tapemarks read.
  • BytesRead - The number of bytes read by the host from this virtual tape during this mounting. This number reflects the uncompressed data delivered to the host.
  • BlocksWritten - The number of tape blocks written by the host to this virtual tape during this mounting. This number does not include tapemarks written.
  • BytesWritten - The number of bytes written by the host to this virtual tape during this mounting. This number reflects the uncompressed data delivered from the host.
  • LowWrite - The lowest byte offset where a host write, write tapemark, or erase was performed to this virtual tape during this mounting. If no data was written to the tape, -1 will be output to distinguish it from a write at loadpoint. Note 2
  • Filesize - The size of the virtual tape volume, in bytes, at the time it was unmounted. If no writes were performed during this mounting, -1 is output to distinguish that the file is unchanged.
  • GoodLocates - The number of locates performed to valid block IDs during this mounting.
  • BadLocates - The number of locates performed to invalid block IDs during this mounting.

Examples


# statfmt --hourly /var/bti/stats/hourly
statfmt - MAS statistics extractor, version 5.00-24.
Copyright (c) 2007 Bus-Tech, Inc.
input file is '/var/bti/stats/hourly'

Date,Hour,Mounts,Drives,BlocksRead,Blockswritten,-
BytesRead,BytesWritten
09/21/2007,14,4,1,-1,-1,968,0
09/21/2007,16,7,2,-1,-1,6198537240,1102968477
09/21/2007,17,4,2,-1,-1,7585128104,1100001400
09/22/2007,15,1,1,-1,-1,0,0
09/23/2007,21,3,3,-1,-1,1000480,1000400
09/23/2007,22,4,4,69,68,1000480,1000400


# statfmt --hourly --minutes /var/bti/stats/hourly
statfmt - MAS statistics extractor, version 5.00-24.
Copyright (c) 2007 Bus-Tech, Inc.
input file is '/var/bti/stats/hourly'

Date,Hour,Mounts,Drives,BlocksRead,Blockswritten,-
BytesRead[00],BytesWritten[00],BytesRead[01],BytesWritten[01],-
BytesRead[02],BytesWritten[02],BytesRead[03],BytesWritten[03],-
BytesRead[04],BytesWritten[04],BytesRead[05],BytesWritten[05],-
BytesRead[06],BytesWritten[06],BytesRead[07],BytesWritten[07],-
BytesRead[08],BytesWritten[08],BytesRead[09],BytesWritten[09],-
BytesRead[10],BytesWritten[10],BytesRead[11],BytesWritten[11],-
BytesRead[12],BytesWritten[12],BytesRead[13],BytesWritten[13],-
BytesRead[14],BytesWritten[14],BytesRead[15],BytesWritten[15],-
BytesRead[16],BytesWritten[16],BytesRead[17],BytesWritten[17],-
BytesRead[18],BytesWritten[18],BytesRead[19],BytesWritten[19],-
BytesRead[20],BytesWritten[20],BytesRead[21],BytesWritten[21],-
BytesRead[22],BytesWritten[22],BytesRead[23],BytesWritten[23],-
BytesRead[24],BytesWritten[24],BytesRead[25],BytesWritten[25],-
BytesRead[26],BytesWritten[26],BytesRead[27],BytesWritten[27],-
BytesRead[28],BytesWritten[28],BytesRead[29],BytesWritten[29],-
BytesRead[30],BytesWritten[30],BytesRead[31],BytesWritten[31],-
BytesRead[32],BytesWritten[32],BytesRead[33],BytesWritten[33],-
BytesRead[34],BytesWritten[34],BytesRead[35],BytesWritten[35],-
BytesRead[36],BytesWritten[36],BytesRead[37],BytesWritten[37],-
BytesRead[38],BytesWritten[38],BytesRead[39],BytesWritten[39],-
BytesRead[40],BytesWritten[40],BytesRead[41],BytesWritten[41],-
BytesRead[42],BytesWritten[42],BytesRead[43],BytesWritten[43],-
BytesRead[44],BytesWritten[44],BytesRead[45],BytesWritten[45],-
BytesRead[46],BytesWritten[46],BytesRead[47],BytesWritten[47],-
BytesRead[48],BytesWritten[48],BytesRead[49],BytesWritten[49],-
BytesRead[50],BytesWritten[50],BytesRead[51],BytesWritten[51],-
BytesRead[52],BytesWritten[52],BytesRead[53],BytesWritten[53],-
BytesRead[54],BytesWritten[54],BytesRead[55],BytesWritten[55],-
BytesRead[56],BytesWritten[56],BytesRead[57],BytesWritten[57],-
BytesRead[58],BytesWritten[58],BytesRead[59],BytesWritten[59]
09/21/2007,14,4,1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
240,0,0,0,0,0,240,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0
09/21/2007,16,7,2,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,160,533,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,-
370400240,0,531456000,176928720,198145160,287040160,82320,-
305952000,0,292832800,1016128,305952000,0,291872800,1868096,-
306752000,0,305700640,0,308448000,0,306336000,0,308448000,0,-
307168000,0,306880000,0,305056000,0,307776480,0,299392000,0,-
296288160,0,293440080,0,293056000,0,296480000,0,296737080,0
09/21/2007,17,4,2,-1,-1,0,0,0,0,0,0,0,0,0,0,160,216416240,248,-
516192000,63008720,367393160,305056248,0,293248240,0,-
271232000,0,301632008,0,306016000,0,308000000,0,305184000,0,-
306884640,0,306656000,0,299744000,0,291392000,0,293248000,0,-
293664000,0,291360000,0,293344640,0,290784080,0,288704080,0,-
295904080,0,296832160,0,298144080,0,295968080,0,289984240,0,-
291168240,0,295360000,0,297920080,0,114688080,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0,0
09/22/2007,15,1,1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0
09/23/2007,21,3,3,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
1000480,1000400,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
09/23/2007,22,4,4,69,68,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1000480,-
1000400,0,0,0,0,0,0,0,0,0,0,0,0


# statfmt --mount /var/bti/stats/vstats
statfmt - MAS statistics extractor, version 5.00-24.
Copyright (c) 2007 Bus-Tech, Inc.
input file is '/var/bti/stats/vstats'

Date,Time,Volser,Device,Error,Scratch,Created,Protected,-
Howlong,Filesize
09/21/2007,14:16:28,2500,N47061,0,0,0,0,47,5571614
09/21/2007,14:19:04,2500,N47061,0,0,0,0,37,5571614
09/21/2007,14:20:49,2500,N47061,0,0,0,0,8,5571614
09/21/2007,14:40:06,2500,N47061,0,0,0,0,119,5571614
09/21/2007,14:43:42,2500,N47061,0,0,0,0,38,5571614
09/21/2007,14:44:30,2500,N47061,0,0,0,0,6,5571614
09/21/2007,14:52:02,2500,N47061,0,0,0,1,73,106478280
09/21/2007,16:27:00,2500,N47062,0,1,0,0,274,184
09/21/2007,16:28:48,2500,D3L063,1,0,0,0,-1,-1
09/21/2007,16:37:18,2404,N47063,0,1,0,0,281,184
09/21/2007,16:40:03,2502,N47064,0,1,0,0,240,184
09/21/2007,16:42:33,250A,N47064,0,0,0,0,2,7880
09/21/2007,16:42:38,2501,N47064,0,0,0,0,1,15329
09/21/2007,16:44:23,2500,N47064,0,0,0,0,3,38466
09/21/2007,16:44:27,2500,N47064,0,0,0,0,2,61593
09/21/2007,17:05:37,2404,N47065,0,1,0,0,239,184
09/21/2007,17:06:21,2500,N47061,0,0,0,1,4,106478280
09/21/2007,17:08:13,2500,N47061,0,0,0,1,29,106478280
09/21/2007,17:09:34,2500,N47061,0,0,0,1,11,106478280
09/22/2007,15:32:50,2500,N47061,0,0,0,1,37,106478280
09/23/2007,21:08:08,2400,N47066,0,1,0,0,300,184
09/23/2007,21:08:10,2401,N47067,0,1,0,0,219,184
09/23/2007,21:09:43,2402,N47068,0,1,0,0,222,184
09/23/2007,22:53:03,2500,N47069,0,1,0,0,243,184
09/23/2007,22:53:08,2502,N47070,0,1,0,0,225,184
09/23/2007,22:53:11,2506,N47071,0,1,0,0,223,184
09/23/2007,22:53:36,2402,N47072,0,1,0,0,434,184


# statfmt --unmount /var/bti/stats/vstats
statfmt - MAS statistics extractor, version 5.00-24.
Copyright (c) 2007 Bus-Tech, Inc.
input file is '/var/bti/stats/vstats'

Date,Time,Volser,BlocksRead,BytesRead,Blockswritten,-
BytesWritten,LowWrite,Filesize,GoodLocates,BadLocates
09/21/2007,14:16:30,N47061,3,240,0,0,-1,-1,0,0
09/21/2007,14:19:05,N47061,4,248,0,0,-1,-1,0,0
09/21/2007,14:20:51,N47061,5,256,0,0,-1,-1,0,0
09/21/2007,14:40:07,N47061,3,240,0,0,-1,-1,0,0
09/21/2007,14:43:43,N47061,3,240,0,0,-1,-1,0,0
09/21/2007,14:44:31,N47061,3,240,0,0,-1,-1,0,0
09/21/2007,14:52:11,N47061,4,248,0,0,-1,-1,0,0
09/21/2007,16:27:01,N47062,2,160,6,533,0,593,0,0
09/21/2007,16:40:10,N47064,2,160,10,82320,0,7880,0,0
09/21/2007,16:42:36,N47064,5,400,7,82080,7690,15329,0,0
09/21/2007,16:42:41,N47064,5,400,59,934048,15139,38466,0,0
09/21/2007,16:44:26,N47064,5,400,59,934048,38276,61593,0,0
09/21/2007,16:44:30,N47064,5,400,59,934048,61403,84786,0,0
09/21/2007,17:04:03,N47063,231018,7391304720,34381,-
1100001400,0,1100207710,0,0
09/21/2007,17:06:31,N47061,4,248,0,0,-1,-1,0,0
09/21/2007,17:08:24,N47061,4,248,0,0,-1,-1,0,0
09/21/2007,17:11:17,N47061,4,248,0,0,-1,-1,0,0
09/21/2007,17:33:22,N47065,237081,7585127360,34381,-
1100001400,0,1100207710,0,0
09/22/2007,15:33:30,N47061,0,0,0,0,-1,-1,0,0
09/23/2007,21:09:43,N47068,69,1000480,68,1000400,0,85185,0,0
09/23/2007,22:28:23,N47066,0,0,0,0,-1,-1,0,0
09/23/2007,22:28:24,N47067,0,0,0,0,-1,-1,0,0
09/23/2007,22:53:37,N47072,69,1000480,68,1000400,0,85185,0,0
09/24/2007,12:08:18,N47071,0,0,0,0,-1,-1,0,0
09/24/2007,12:08:18,N47069,0,0,0,0,-1,-1,0,0
09/24/2007,12:08:18,N47070,0,0,0,0,-1,-1,0,0


Note 1: In MAS releases prior to 5.00-24, the hourly BlocksRead and BlocksWritten were recorded incorrectly. For this reason, for hourly statistics records created prior to MAS 5.00-24 these fields will be output as -1 to indicate their unavailability. for hourly statistics records created by MAS 5.00-24 and above, the proper values are output.

Note 2: In MAS releases prior to 5.00-23, the LowWrite field was recorded incorrectly. For this reason, for statistics records created prior to MAS 5.00-24 this field will be output as -1 to indicate its unavailability. For statistics records created by MAS 5.00-23 and above, the proper value is output.


Copyright © 2005 by Bus-Tech, Inc.