/*****************************************************************************/
/*   Patched by Marcel J.E. Mol marcel@mesa.nl (C) MESA Consulting B.V.      */
/*   (C) Copyright 2001-2003, MESA Consulting B.V.                           */
/*                                                                           */
/*   This patched version of tapeutil provides readable information on       */
/*   logpage 0C, 30, 31 and 32. It also changes the layout of the inventory  */
/*   command.                                                                */
/*   The -v option (must be first) also dumps bytes on mentioned logpages    */
/*   and shows extended info on inventory.                                   */
/*   The read/write/rtest/wtest/rwtest commands show throughput values.      */
/*                                                                           */
/*****************************************************************************/

05feb2004 - Added patch for tapeutil 1.58
            This one also contains two new commands to read out bock size
            limits (blocklimits option) and the MAM (readattributes option)
27aug2003 - Added Poweruptime to logpage c
            Added logpage 30
            removed diff for tapeutil 1.47 (the one for 1.48 can be used...)
26aug2003 - Initial public release

      Name                    Last modified       Size  Description

[DIR] Parent Directory 08-Nov-2010 19:46 - [   ] tu-166.gz 10-May-2005 11:08 31k [   ] tu166.diff.gz 10-May-2005 11:08 7k [   ] tu-158.gz 05-Feb-2004 15:37 42k [   ] tu158.diff.gz 05-Feb-2004 15:35 7k [TXT] README.txt 05-Feb-2004 15:35 5k [   ] tu-149.gz 27-Aug-2003 21:46 39k [   ] tu150.diff.gz 27-Aug-2003 21:17 6k [   ] tu149.diff.gz 27-Aug-2003 21:17 6k [   ] tu148.diff.gz 27-Aug-2003 21:17 5k

Patches for tapeutil.c, part of the AIX Atape LPP.

It decodes the data generated by certain logpages.

The output of the inventory command has be changed for easy processing with scripts.

Please check your current tapeutil.c (e.g. /usr/lpp/Atape/samples/tapeutil.c)
to check your current version and download corresponding patch.

Use gunzip to uncompress the patches and use the patch program to apply the patch.

WARNING: This is only tested on LTO tape drives.

Use at your own risk.

MESA Consulting cannot be hold responsible for any damage incurred by
the use of these patches.

I named the patched version 'tu'.
Examples:

$ tu -f /dev/rmt1 logpage c
Issuing log sense for page 0x0C...
   0 - Write Bytes Received before Compression:            0
   1 - Write Bytes Received after Compression:             0
   2 - Read Bytes Sent before Compression:                 0
   3 - Read Bytes Sent after Compression:                  0
0100 - Cleaning Required:                                  0
8000 - Megabytes processed since last cleaning:     20598158
8001 - Lifetime Load Cycles:                            1313
8002 - Lifetime Cleaning Cycles:                           1
8003 - Power-on time:                 129 days, 14:21:29

$ ./tu -f /dev/rmt1 logpage 30
Issuing log sense for page 0x30...
 1 - Thread Count:                                   40
 2 - Total Data Sets Written:                    308068
 3 - Total Write Retries:                          5884
 4 - Total Unrecovered Write Errors:                  0
 5 - Total Suspended Writes:                       2474
 6 - Total Fatal Suspended Writes:                    0
 7 - Total Data Sets Read:                       124099
 8 - Total Read Retries:                             20
 9 - Total Unrecovered Read Errors:                   0
10 - Total Suspended Reads:                           0
11 - Total Fatal Suspended Reads:                     0


$ tu -f /dev/rmt1 logpage 31
Issuing log sense for page 0x31...
 1 - Main Partition Remaining Capacity:           42384MB
 2 - Alternate Partition Remaining Capacity:          0MB
 3 - Main Partition Maximum Capacity:             95367MB
 4 - Alternate Partition Maximum Capacity:            0MB


$ tu -f /dev/rmt1 logpage 32
Issuing log sense for page 0x32...
 0 - Read Compression Ratio:         0.0
 1 - Write Compression Ratio:        0.0
 2 - Megabytes to Host:                0MB
 3 - Bytes to Host:                    0B
      Bytes to Host:                   0B (0 MB)
 4 - Megabytes from Tape:              0MB
 5 - Bytes from Tape:                  0B
      Bytes from Tape:                 0B (0 MB)
 6 - Megabytes from Host:              0MB
 7 - Bytes from Host:                  0B
      Bytes from Host:                 0B (0 MB)
 8 - Megabytes to Tape:                0MB
 9 - Bytes to Tape:                    0B
      Bytes to Tape:                   0B (0 MB)

$ tu -f /dev/rmt1 blocklimits
Getting block_limits data from device...

  Max  16777215 (0xFFFFFF)
  Min  1 (0x1)


$ tu -f /dev/rmt1 readattributes
Getting read_attributes data from device...
Attribute values length: 0x1C1
 Atribute number/name                                   read/write    Value
 --------------------------------------------------------  --  ------------------>
 0000 - Remaining Capacity in Partition (MB)               RO: 0x0000000000017487
 0001 - Maximum Capacity in Partition (MB)                 RO: 0x0000000000017487
 0002 - TapeAlert Flags                                    RO: 0x0000000000000000
 0003 - Load Count                                         RO: 0x0000000000000018
 0004 - MAM Space Remaining( bytes)                        RO: 0x00000000000003F0
 0005 - Assigning Organization                             RO: LTO_CVE
 0006 - Formatted Density Code                             RO: 0x40
 0007 - Initialization Count (media formatted)             RO: 0x0011
 020a - Device Make/Serial Number at Last Load             RO: IBM     1311060216
 020b - Device Make/Serial Number at Load - 1              RO: IBM     1311060216
 020c - Device Make/Serial Number at Load - 2              RO: IBM     6811092286
 020d - Device Make/Serial Number at Load - 3              RO: IBM     6811092286
 0220 - Total Megabytes Written in Medium Life             RO: 0x00000000000C2A18
 0221 - Total Megabytes Read in Medium Life                RO: 0x000000000000AD24
 0222 - Total Megabytes Written in Current/Last Load       RO: 0x0000000000000000
 0223 - Total Megabytes Read in Current/Last Load          RO: 0x0000000000000000
 0400 - Medium Manufacturer                                RO: FUJIFILM
 0401 - Medium Serial Number                               RO: 00DA000535
 0402 - Medium Length                                      RO: 0x00000261
 0403 - Medium Width                                       RO: 0x0000007F
 0404 - Assigning Organization                             RO: LTO_CVE
 0405 - Medium Density Code                                RO: 0x40
 0406 - Medium Manufacture Date (yyyymmdd)                 RO: 20001210
 0407 - MAM Capacity (bytes)                               RO: 0x0000000000001000
 0408 - Medium Type                                        RO: 0x00
 0409 - Medium Type Information                            RO: 0x0000