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