11 Reporting and Logging

This chapter describes how to:

  • Create a custom volume report

  • Create a report for volume movement statistics

Creating a Custom Volume Report

You can use the volrpt utility to create a volume report; for more information, see "volrpt". $ACS_HOME/data/external/volrpt/owner_id.volrpt is a sample input file that you can run or use as a template to create customized volume reports. You can also save your customized volume reports in the $ACS_HOME/data/external/volrpt directory. Use this procedure to create an input file to the volrpt utility to create a custom volume report.

To create a custom volume report, complete the following:

  1. Log in as acsss.

  2. Open a UNIX command tool.

  3. Change to the custom volume report directory:

    cd /home/ACSSS/data/external/volrpt

  4. Copy the sample volume report file to a new, custom file.

    cp owner_id.volrpt my.volrpt

    my.volrpt is the name you want to assign to the new file.

  5. Using a text editor, such as vi, edit the my.volrpt file to specify the fields and formats you want to see on the custom report.

    • You can specify any of the fields listed in the sample file.

    • The format for each entry is: field_name field_length delimiter_length

    • You can make the field lengths and delimiters any size you want. Just be sure that all of the fields you specify will fit on one line when the report prints.

    • Detailed editing instructions are given in the sample file.

  6. When you are finished editing the file, save it.

Custom Volume Report

You create a customized report by designating fields, field length, and delimiter lengths in an input file, such as the one shown in the following example, below.

################################################################
#
# FIle name: owner_id.volrpt
#
# This file describes the report layout for volrpt invoked with   # the -f option. # volrpt -f <filename>
#
# The format of a line is:
# field_namefield_lengthdelimiter_length
#
# The field length is the number of characters which will be printed for
# the field. The delimiter length is the number of spaces that will be
# printed after the field. If you leave out the lengths, or specify a
# value of -1, the default values will be used. Default delimiters are
# always 2. ere are the fields and their default lengths.
# 
# ACCESS_COUNT       5      2
# ACCESS_DATE       15      2
# CELL_ID           14      2
# DRIVE_ID          10      2
# ENTRY_DATE        15      2
# LABEL_ATTR         5      2
# LOCK_ID            5      2
# LOCK_TIME         15      2
# MAX_USE            5      2
# MEDIA_TYPE         7      2
# OWNER_ID          20      2
# POOL_ID            5      2
# VOLUME_ID          6      2
# VOL_STATUS        17      2
# VOLUME_TYPE        4      2
#
# Revision History:
# xx/xx/xx Name     Changes
#
################################################################
VOLUME_ID            6      2
MEDIA_TYPE           7      2
DRIVE_ID            12      2
CELL_ID             14      2
OWNER ID            -1      0

From this input file, generate the customized report shown. Among other uses, a customized report, as shown in the following example, allows you to report the owners of the volumes.

An example of a customized volume report using the input file:

2014-06-30 13:22:07

TOTAL    VOLUMES:2   SEQUENCE:   sort by volume identifier

Volume   Media                     Home                   Owner

Label    Type       Drive ID       Location               ID

RB1400   3480       Not-in-drv     0, 1, 1, 0, 0          cray
RB1401   DD3A       0, 0, 1, 0     0, 1, 2, 0, 0          cray

Custom Volume Report Example

The following volrpt includes ACSs 0 and 1, absent and ejected volumes, and shows the status of volumes.

The input volrpt option::

volrpt -f my.volrpt -a 0 1 -i

These control statements are used to select and format the output.

Example of a custom volume report control statements:

CELL_ID          14           2
VOLUME_ID         6           2
VOL_STATUS       17           0
POOL_ID           5           2
ACCESS_COUNT      5           1
LOCK_ID           5           1
OWNER_ID         20           0

Example of custom volrpt showing absent and ejected volumes:

VOLUME REPORT UTILITY

2014-06-03 15:27:48

TOTAL VOLUMES: 61      SEQUENCE: sort by volume identifier

Home            Volume   Volume         Pool  Times  Lock Owner
Location---     Label   Status          ID    Mount  ID   ID------------

1, 0, 0, 0, 0   ABC001  VOLUME_HOME      0    2     0     presc
0,-1, 0, 0, 0   ABC002  VOLUME_ABSENT    0    0     0
0,-1, 0, 0, 0   ABC003  VOLUME_ABSENT    0    0     0
1, 3, 0, 0, 3   ABC004  VOLUME_MISSING   0    0     0
1, 3, 0, 0, 4   ABC005  VOLUME_MISSING   4    0     28001 tom
1, 3, 0, 0, 5   ABC006  VOLUME_MISSING   0    0     0
0,-1, 0, 0, 0   ABC007  VOLUME_ABSENT    0    0     0
1, 0, 0, 0, 7   ABC008  VOLUME_HOME      0    0     0
0,-1, 0, 0, 0   ABC009  VOLUME_ABSENT    0    0     0
0,-1, 0, 0, 0   ABC010  VOLUME_ABSENT    0    0     0     presc
1, 0, 0, 0,10   ABC011  VOLUME_HOME      0    0     0
1, 0, 0, 0,12   ABC012  VOLUME_HOME      0    0     2371  abc012
1, 0, 0, 0,13   ABC013  VOLUME_HOME      0    0     28001
1, 0, 0, 0,14   ABC014  VOLUME_HOME      0    0     28001
0,-1, 0, 0, 0   ABC015  VOLUME_ABSENT    1    0     29712
0,-1, 0, 0, 0   ABC016  VOLUME_EJECTED   1    0     29712
0,-1, 0, 0, 0   ABC017  VOLUME_ABSENT    1    0     29712
0,-1, 0, 0, 0   ABC018  VOLUME_ABSENT    1    0     29712
1, 0, 0, 0,19   ABC019  VOLUME_HOME      1    0     0
1, 0, 0, 0,20   ABC020  VOLUME_HOME      1    0     0
0,-1, 0, 0, 0   ABC021  VOLUME_ABSENT    0    0     0
0,-1, 0, 0, 0   ABC022  VOLUME_ABSENT    4    0     0

Creating a Logging Volume Statistics Report

You can use the Volume Statistics Log file (acsss_stats.log) to log volume movement statistics. These statistics consist of entries for each time ACSLS detects that a volumes' location changed. ACSLS logs entries for enters, ejects, mounts, dismounts, and for each time an audit detects that a volumes' location has changed (typically, by being manually moved).

Use the acsss_config configuration program to perform the following:

  • Enable or disable volume statistics logging using the LIB_VOL_STATS variable.

  • Specify the maximum size of the Volume Statistics Log file.

  • Specify the number of rollover files for the Volume Statistics Log file.

The stats_report utility uses the acsss_stats.log to report all mounts and tape drive usage.

The Volume Statistics Log file contains collection mode entries that tell if volume statistics logging is enabled or disabled and volume statistics entries.

Example of Volume Statistics Log file entries:

2014-06-30 08:53:00 CONFIG
Library volume statistics on.

2014-06-30 09:23:08 EJECT
U01120 Home 0,0,1,3,5 Cap 1,0,0 Client Host Id 129.81.15.25

2014-06-30 10:36:05 ENTER
PB0444 Home 0,0,4,3,5 Cap 0,0,0 Client Host Id 129.81.15.25

2014-06-30 10:42:48 MOUNT
PB0478 Home 0,0,1,35,1 Drive 0,0,1,0 Client Host Id Local

2014-06-30 10:43:19 DISMOUNT
PB0478 Home 0,0,1,35,1 Drive 0,0,1,0 Client Host Id Local

2014-06-30 10:43:19 AUDIT 
RB0478 0,0,1,35,1  STATUS_VOLUME_NOT_FOUND Client Host Id JBHUTTO

2014-06-30  10:43:19  AUDIT
PB0444  0,0,1,32,1 STATUS_VOLUME_FOUND Client Host Id JBHUTTO

2014-06-30 10:45:00 CONFIG
Library volume statistics off.

2015-01-16 09:51:07 ACSCR
0A1235 Home 0,0,5,14,14 STATUS_VOLUME_NOT_FOUND Client Host Id Local

2015-01-16 09:40:13 ACSCR
0A123A Home 0,0,5,14,15 STATUS_VOLUME_FOUND Client Host Id Local

In the above example, the collection mode entries show that statistics collection started at 8:53 a.m on June 30, 2014 and ended at 10:45 a.m. the same day. These collection start and stop times bracket the volume statistics entries for this collection period.

The format of the volume statistics entries, is:

  • yyyy-mm-dd hh:mm:ss command

    vol_id home_loc function_loc client_host_ID

Where:

  • yyyy-mm-dd is the year, month, and day of the entry. Four-digit year formats are supported. You specify the date format using acsss_config.

  • hh:mm:ss is the hour, minute, and second of the entry.

  • command is the ACSLS command or client request that either moved the volume or (for audits) detected that the volume was moved.

    • MOUNT is the mount request.

    • DISMOUNT is the dismount request.

    • ENTER is the manual or automatic mode enter request.

    • EJECT is the eject request.

    • AUDIT is the audit request.

    • ACSMV is the move request.

    • ACSCR is the Volume Recovery activity. This activity is generated automatically by ACSLS processing.

  • vol_id is the volume identifier.

  • home_loc is the volumes' home (storage cell) location.

  • function_loc is the volumes' location for the requests that used the volume as follows:

    • mount or dismount requests

      location is a transport ID.

    • enter or eject requests

      location is a CAP ID.

  • audit requests specifies that an audit detected one of the following errors:

    • STATUS_VOLUME_FOUND

      The audit found a volume in a location that did not match the location specified in the database.

    • STATUS_VOLUME_NOT_FOUND

      The audit did not find a volume in the location specified in the database.

    • Volume Recovery activity

      Location may be a cell ID or a transport ID, indicating that Volume Recovery detected one of the following situations:

      • STATUS_VOLUME_FOUND

        A volume was found which was not recorded in the database, and is being added.

      • STATUS_VOLUME_NOT_FOUND

        A volume in the database was not found in any recorded location, and is being deleted.

  • client_host_ID is one of the following;

    • For client application requests it is the host IP address.

    • For cmd_proc commands, if the environment variable LIBVOLSTATS_CMD_PROC_ID is set (ASCII characters only) in the environment of the shell that started the cmd_proc, the entry is the first 12 characters of the value of the environment variable.

    • For cmd_proc commands, if the environment variable LIBVOLSTATS_CMD_PROC_ID is not set or contains non-ASCII characters, the entry is Local.