December 19th, 1999 by Robin T. Miller

	The following are the recent changes made to 'scu':

     o	Added support for medium changer Volume Tag support:
	- volume tags displayed automatically if changer supports them.
	- tape media *must* have bar codes inserted, or tags are blank.

     o	Added support for IOT test disc pattern for read/writes.
	- this feature is enabled via "popts iot"

     o	Added support for the following Compaq Inquiry VPD pages:
	- Tape Inquiry Information.
	- Controller Information page.
	- HDA Component Codes page.
	- PCBA component Codes page.
	- Component Codes pages 0xD3 & 0xD4.

     o	Added support for the following Mode Pages:
	- Compaq Library Configuration page.
	- TapeAlert page.
	- updated CD-ROM Capability & Mechanical page to SCSI-3

     o	Added support for the following log pages:
	- Tape/Autoloader Alert page.
	- Compaq Device Wellness page.
	- Compaq Device Status page.
	- error event page displayed in all ASCII (no hex).
	- unknown parameters displayed in decimal and hex.

	Note: The latter pages are for Compaq libraries and tapes.

	Also Note:  The log pages now have a new format (see below).
	[ Sorry if this breaks folks scripts, but it was necessary. ]

     o	New options for "show log pages" to limit parameters reported:

      Format:
                            { [ code hex-code ]   }
                            { [ log-page ]        }
                            { [ supported ]       }
        scu> show log pages { [ parameter value ] } [ pcf page-control ] [ full | summary ]
                            { [ starting value ]  }
                            { [ ending value ]    }
                            { [ number value ]    }

	Note:  By default "show log pages" does NOT display vendor unique
	log pages, you must use "show log pages all" or specific a page code.

	Also Note:  For the Compaq Device Status page, only 'scu' implemented
	parameters are displayed (to limit hundreds reported by some pages).

     o	Added support for vendor specific sense code/qualifiers:
	- mostly done for TL800 family libraries (Overland Data, Inc).
	- Compaq specific (from HDDQ) sense codes added.
	- some Quantum (DLT) sense codes added.
	- framework in place to easily add others.

     o	Added better support for vendor inquiry/log/mode sense pages.

     o	Converted the 'scu' help file into HTML (see web page below).

     o	Fixed problem with improper length detection when processing
	Inquiry Device Indentification page (count went negative!).

     o	'scu' now handles 64-bit values on all supported operating systems.
	O/S's include: Tru64 Unix, Linux, SCO UnixWare, and Windows/NT.

	Updated versions of 'scu' are available via the following URL's:

		http://www.zk3.dec.com/~rmiller/scu.html
		http://www.zk3.dec.com/~rmiller/linux.html

	Note: Only the Tru64 and Linux Intel 'scu' are currently upto date.

	A fair amount of rewrite was done to the mode sense and log sense
modules, so please let me know if you run into any anomolies (regressions).

	Please Note: Digital Classic devices don't support Compaq extensions.
	How do you tell?  Look at the Inquiry page for Vendor ID "COMPAQ".

	NOTE:  This work is provided by the Data Products Group, managed by
Charlie Newfell.  These changes are not currently part of the Tru64 release.

Cheers,
Robin
================================================================================
Examples with Compaq Disk Drive:
--------------------------------

tru64% scu sbtl 0 1 0 \; show inquiry pages
		.
		.
		.

Device Identification Page:

                             Page Code: 0x83
                           Page Length: 48

                              Code Set: 0x2 (identifier is ASCII)
                       Identifier Type: 0x1
                     Identifier Length: 32
              Vendor Unique Identifier: SEAGATE ST318275LC      3AK0ADZQ

                              Code Set: 0x1 (identifier is binary)
                       Identifier Type: 0x2
                     Identifier Length: 8
       IEEE Unique Identifier (EUI-64): 0x2037fffe31aef0

		.
		.
		.

Controller Information Page:

                             Page Code: 0xd0
                           Page Length: 16
                       Tag Queue Depth: 64
              Multi Initiator Revision: 2
          Persistent Reserve Certified: No
                   Firmware Image Size: 303 Kbytes
                     Drive Buffer Size: 900 Kbytes
                        Code Load Time: 30 seconds
                           Format Time: 2400 seconds
                   Big-Endian Ordering: No
		.
		.
		.

HDA Components Page:

                             Page Code: 0xd1
                           Page Length: 224
                 HDA Component 1 Codes: 9L2004-032      
                 HDA Component 2 Codes: 77896477        
                 HDA Component 3 Codes: GJW4031563      
                 HDA Component 4 Codes: 00082K          
                 HDA Component 5 Codes: 2232F09632      
                 HDA Component 6 Codes:                 
                 HDA Component 7 Codes: TN00594O        
                 HDA Component 8 Codes: KN005A43        
                 HDA Component 9 Codes:                 
                HDA Component 10 Codes:                 
                HDA Component 11 Codes:                 
                HDA Component 12 Codes:                 
                HDA Component 13 Codes:                 
                HDA Component 14 Codes:                 

PCBA Components Page:

                             Page Code: 0xd2
                           Page Length: 96
                PCBA Component 1 Codes: 83416138        
                PCBA Component 2 Codes: 83470355        
                PCBA Component 3 Codes: 89860           
                PCBA Component 4 Codes: F               
                PCBA Component 5 Codes: 7008KH3N        
                PCBA Component 6 Codes: 008             
		.
		.
		.
tru64% scu sbtl 0 1 0 \; show log pages    

Write Error Counter Parameters (Page 0x2 - Current Cumulative Values):

 Errors Corrected with Possible Delays: 0
           Total re-Reads or re-Writes: 0
                Total Errors Corrected: 0
  Times Correction Algorithm Processed: 0
                 Total Bytes Processed: 948736
              Total Uncorrected Errors: 0

Read Error Counter Parameters (Page 0x3 - Current Cumulative Values):

Errors Corrected w/o Substantial Delay: 41
 Errors Corrected with Possible Delays: 0
           Total re-Reads or re-Writes: 0
                Total Errors Corrected: 41
  Times Correction Algorithm Processed: 41
                 Total Bytes Processed: 1952436224
              Total Uncorrected Errors: 0

Verify Error Counter Parameters (Page 0x5 - Current Cumulative Values):

Errors Corrected w/o Substantial Delay: 0
 Errors Corrected with Possible Delays: 0
           Total re-Reads or re-Writes: 0
                Total Errors Corrected: 0
  Times Correction Algorithm Processed: 0
                 Total Bytes Processed: 0
              Total Uncorrected Errors: 0

Non-Medium Error Counter Parameters (Page 0x6 - Current Cumulative Values):

          Parameter 0x0, Counter Value: 0

tru64% 

--------------------------------------------------------------------------------
Examples with TL891 Mini-Library:
---------------------------------

tru64% scu sbtl 1 0 0 \; show inquiry pages

Unit Serial Number Page:

                             Page Code: 0x80
                           Page Length: 12
                 Product Serial Number: Az09BCDEFGHI

Compaq Tape Inquiry Page:

                             Page Code: 0xcc
                           Page Length: 32
                    Soft Reset Support: No
               Command Queuing Support: No
                Linked Command Support: No
            Synchronous Data Transfers: Yes
          Support for 16 Bit Transfers: Yes
          Support for 32 Bit Transfers: No
           Relative Addressing Support: No
                 Vendor Identification: COMPAQ  
                Product Identification: TL891           
               Firmware Revision Level: 0505

Controller Information Page:

                             Page Code: 0xd0
                           Page Length: 16
                       Tag Queue Depth: 0
              Multi Initiator Revision: 0
          Persistent Reserve Certified: No
                   Firmware Image Size: 512 Kbytes
                     Drive Buffer Size: 0 Kbytes
                        Code Load Time: 300 seconds
                           Format Time: 0 seconds
                   Big-Endian Ordering: No

tru64% scu sbtl 1 0 0 \; show log pages 

Tape/Autoloader Alert Parameters (Page 0x2E - Current Cumulative Values):

               Library Hardware A (F1): 0
               Library Hardware B (F2): 0
               Library Hardware C (F3): 0
               Library Hardware D (F4): 0
     Library Diagnostics Required (F5): 0
                Library Interface (F6): 0
               Predictive Failure (F7): 0
              Library Maintenance (F8): 0
                 Library Humidity (F9): 0
             Library Temperature (F10): 0
            Library Power Limits (F11): 0
              Library Stray Tape (F12): 0
              Library Pick Retry (F13): 0
             Library Place Retry (F14): 0
              Library Load Retry (F15): 0
                    Library Door (F16): 0
                Library Mailslot (F17): 0
                Library Magazine (F18): 0
                Library Security (F19): 0
           Library Security Mode (F20): 0
                 Library Offline (F21): 0
           Library Drive Offline (F22): 0
              Library Scan Retry (F23): 0
               Library Inventory (F24): 0
       Library Illegal Operation (F25): 0
       Dual-Port Interface Error (F26): 0
             Cooling Fan Failure (F27): 0
                    Power Supply (F28): 0
               Power Consumption (F29): 0
  Pass-through Mechanism Failure (F30): 0
Cartridge in Pass-thru Mechanism (F31): 0
       Unreadable Barcode Labels (F32): 0
		.
		.
		.
Device Wellness Parameters (Page 0x33 - Current Cumulative Values):

         Parameter 0x0, Parameter Data: 00 00 2c 18 00 00 00 00 09 04 03 00 
                             Sense Key: 0x9 (Firmware Upgraded, Revision 4.03)
         Parameter 0x1, Parameter Data: 00 00 2c c3 00 00 00 00 09 04 09 00 
                             Sense Key: 0x9 (Firmware Upgraded, Revision 4.09)
         Parameter 0x2, Parameter Data: 00 00 2c e7 00 00 00 00 09 05 05 00 
                             Sense Key: 0x9 (Firmware Upgraded, Revision 5.05)
         Parameter 0x3, Parameter Data: 00 00 2d 43 00 00 00 00 09 05 05 00 
                             Sense Key: 0x9 (Firmware Upgraded, Revision 5.05)
         Parameter 0x4, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0x5, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0x6, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0x7, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0x8, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0x9, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0xa, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0xb, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0xc, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0xd, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0xe, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0xf, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 

Device Status Parameters (Page 0x3E - Current Cumulative Values):

          Parameter 0x0, Counter Value: 0
                    Device Status Bits: 0x10010a00
                            Door State: Closed
                       Wellness Status: Okay
                    Temperature Status: Not Supported
                 Redundancy Capability: Redundancy NOT Capable
                   Hot Swap Capability: Hot Swap NOT Capable
           Total Number of Loads/Moves: 38250
       Total Number of Cleaning Events: 0xffffffff (unable to support)
                        Product Number: 0x8210901 (ODI Changer Tape Library)
        Total Number of Power on Hours: 11704
                 Total Number of Moves: 38250
    Power on Hours since last Power on: 117
 Power on Hours since last Calibration: 117
          Number of Full Storage Slots: 73
         Number of Empty Storage Slots: 1
 Number of Pick Retries since Power On: 9
Number of Place Retries since Power On: 0
        Number of Barcode Read Retries: 0
                Total Number of Drives: 0

tru64% scu sbtl 1 0 0 \; show log page status param 4 full

Device Status Parameters (Page 0x3E - Current Cumulative Values):

                             Page Code: 0x3e
                           Page Length: 62424
                        Parameter Code: 0x4
       List Parameter Data Format (LP): 0 (Data Counter)
          Threshold Met Criteria (TMC): 0 (Notify of every update of cumulative value)
       Enable Threshold Criteria (ETC): No
             Target Save Disable (TSD): 0
                     Disable Save (DS): 1
                   Disable Update (DU): No (Data counting is enabled)
                      Parameter Length: 4
                        Product Number: 0x8210901
                           Vendor Name: ODI
                           Device Type: Medium Changer
                       Technology Type: Tape Library

tru64% scu sbtl 1 0 0 \; show elements

               Element  Transport  Exception  Element  Volume
               Address   Status      State     Type     Tags
               -------  ---------  ---------  -------  ------
  Transport 0:     0      Empty     Normal      MT     
       Slot 0:     1      Empty     Normal      ST     
       Slot 1:     2      Empty     Normal      ST     
       Slot 2:     3      Empty     Normal      ST     
       Slot 3:     4      Empty     Normal      ST     
       Slot 4:     5      Empty     Normal      ST     
       Slot 5:     6      Empty     Normal      ST     
       Slot 6:     7      Empty     Normal      ST     
       Slot 7:     8      Empty     Normal      ST     
       Slot 8:     9      Full      Abnormal    ST     
       Slot 9:    10      Full      Normal      ST     CLN909
      Drive 0:   240      Full      Normal      DT     CLN900
      Drive 1:   241      Full      Normal      DT     CLN901

tru64% scu sbtl 1 0 0 \; show element slot 8 full

Element Status Header:

                 First Element Address: 9
          Number of Elements Available: 1
        Byte Count of Report Available: 60

Element Status Page:

                     Element Type Code: 2 (Storage)
            Primary Volume Tag Present: Yes
          Alternate Volume Tag Present: No
             Element Descriptor Length: 52
       Descriptor Byte Count Available: 52

Storage Element Descriptors:

                       Element Address: 9
                      Transport Status: Full
                       Exception State: Abnormal
    Access by Medium Transport Allowed: Yes
       Additional Sense Code/Qualifier: (0x83, 0x9) = No BarCode Label Detected
                 Storage Element Valid: No

tru64% 

--------------------------------------------------------------------------------
Examples with TZ89 Tape Drive:
------------------------------

tru64% scu sbtl 1 4 0 \; show inquiry page tape

Compaq Tape Inquiry Page:

                Peripheral Device Type: Sequential Access
                  Peripheral Qualifier: Peripheral Device Connected
                             Page Code: 0xcc
                           Page Length: 32
                    Soft Reset Support: No
               Command Queuing Support: No
                Linked Command Support: Yes
            Synchronous Data Transfers: Yes
          Support for 16 Bit Transfers: Yes
          Support for 32 Bit Transfers: No
           Relative Addressing Support: No
                 Vendor Identification: COMPAQ  
                Product Identification: 35/70GB DLT LDRV
               Firmware Revision Level: 2150

tru64% scu sbtl 1 4 0 \; show page tapealert   

TapeAlert Control Parameters (Page 0x1C - Current Values):

Mode Parameter Header:

                      Mode Data Length: 23
                           Medium Type: 0x85
                            Tape Speed: 0 (Using Default Speed)
                         Buffered Mode: 0x1 (Buffering Enabled)
                       Write Protected: No
               Block Descriptor Length: 8

Mode Parameter Block Descriptor:

                          Density Code: 0x1b (85700 BPI (MFM, CS))
              Number of Logical Blocks: 0
                  Logical Block Length: 0

Page Header / Data:
                             Page Code: 0x1c
                    Parameters Savable: No
                           Page Length: 10
          Log Informational Exceptions: No
        Generate Test/False Conditions: No
      Disable All Exception Operations: Yes
            Prevent Performance Delays: No
     Method to Report Exception (MRIE): 3 (Conditionally generate RECOVERED ERROR)
        Report Time Interval Frequency: 0 (report exception condition one time)
             Times to Report Condition: 0 (no limit)

tru64% scu sbtl 1 4 0 \; show log pages     

Write Error Counter Parameters (Page 0x2 - Current Cumulative Values):

Errors Corrected w/o Substantial Delay: 0
 Errors Corrected with Possible Delays: 0
           Total re-Reads or re-Writes: 4
                Total Errors Corrected: 4
  Times Correction Algorithm Processed: 0
                 Total Bytes Processed: 1427728800
              Total Uncorrected Errors: 0
       Parameter 0x8000, Counter Value: 4 (0x4)
       Parameter 0x8001, Counter Value: 277 (0x115)
       Parameter 0x9000, Counter Value: 73 (0x49)
       Parameter 0x9001, Counter Value: 76 (0x4c)
       Parameter 0x9002, Counter Value: 95 (0x5f)
       Parameter 0x9003, Counter Value: 96 (0x60)
       Parameter 0x9004, Counter Value: 0
       Parameter 0x9005, Counter Value: 0
       Parameter 0x9006, Counter Value: 0
       Parameter 0x9007, Counter Value: 0

Read Error Counter Parameters (Page 0x3 - Current Cumulative Values):

Errors Corrected w/o Substantial Delay: 0
 Errors Corrected with Possible Delays: 0
           Total re-Reads or re-Writes: 0
                Total Errors Corrected: 0
  Times Correction Algorithm Processed: 0
                 Total Bytes Processed: 1428883520
              Total Uncorrected Errors: 0
       Parameter 0x8000, Counter Value: 0
       Parameter 0x8001, Counter Value: 9 (0x9)
       Parameter 0x9000, Counter Value: 20 (0x14)
       Parameter 0x9001, Counter Value: 29 (0x1d)
       Parameter 0x9002, Counter Value: 31 (0x1f)
       Parameter 0x9003, Counter Value: 48 (0x30)

Last 'n' Error Events Parameters (Page 0x7 - Current Cumulative Values):

Packet # 102 - BugCheck Error: EE08   [V80-0   4-AUG-1998]
 PC= 00002904  SR= 2600  Cntxt= Intrp  000:11:41.350  POH/PC= 6109/158
  MSP = 00118EA8  ISRret = 000033F4 (IDLE )
       0000061C 00000000 00026406 00210000 00000000 001194C0 00022100 00028790
       00230000 0010CD38 0010CD38 00230000 00028518 00118BBC 00118EBC 00119458
Packet # 103 - BugCheck Error: EE08   [V80-0   4-AUG-1998]
 PC= 00002904  SR= 2600  Cntxt= Intrp  000:11:41.326  POH/PC= 6109/159
  MSP = 00118EAC  ISRret = 00002D3C (IDLE )
       0000061C 00000043 00026406 00210000 00000000 001194C0 00022104 00025528
       00024E56 0010CD38 0010CD38 00230000 00028518 00118BBC 00118EBC 00119470
		.
		.
		.
Tape/Autoloader Alert Parameters (Page 0x2E - Current Cumulative Values):

                     Read Warning (F1): 0
                    Write Warning (F2): 0
                       Hard Error (F3): 0
                            Media (F4): 0
                     Read Failure (F5): 0
                    Write Failure (F6): 0
                       Media Life (F7): 0
                   Not Data Grade (F8): 0
                    Write Protect (F9): 0
                      No Removal (F10): 0
                  Cleaning Media (F11): 0
              Unsupported Format (F12): 0
       Receoverable Snapped Tape (F13): 0
      Unrecoverable Snapped Tape (F14): 0
Memory Chip in Cartridge Failure (F15): 0
                    Forced Eject (F16): 0
                Read Only Format (F17): 0
Tape Directory Corrupted on Load (F18): 0
              Nearing Media Life (F19): 0
                       Clean Now (F20): 0
                  Clean Periodic (F21): 0
          Expired Cleaning Media (F22): 0
           Invalid Cleaning Tape (F23): 0
             Retention Requested (F24): 0
       Dual-Port Interface Error (F25): 0
             Cooling Fan Failure (F26): 0
                    Power Supply (F27): 0
                Power Consuption (F28): 0
               Drive Maintenance (F29): 0
                      Hardware A (F30): 0
                      Hardware B (F31): 0
                       Interface (F32): 0
                     Media Eject (F33): 0
                   Download Fail (F34): 0
                  Drive Humidity (F35): 0
               Drive Temperature (F36): 0
                   Drive Voltage (F37): 0
              Predictive Failure (F38): 0
            Diagnostics Required (F39): 0
               Loader Hardware A (F40): 0
               Loader Stray Tape (F41): 0
               Loader Hardware B (F42): 0
                     Loader Door (F43): 0
               Loader Hardware C (F44): 0
                 Loader Magazine (F45): 0
       Loader Predictive Failure (F46): 0
         Parameter 0x2f, Counter Value: 0
         Parameter 0x30, Counter Value: 0
         Parameter 0x31, Counter Value: 0
                 Lost Statistics (F50): 0
  Tape Directory Invalid at Load (F51): 0
  Tape System Area Write Failure (F52): 0
   Tape System Area Read Failure (F53): 0
                No Start of Data (F54): 0
         Parameter 0x37, Counter Value: 0
         Parameter 0x38, Counter Value: 0
         Parameter 0x39, Counter Value: 0
         Parameter 0x3a, Counter Value: 0
         Parameter 0x3b, Counter Value: 0
         Parameter 0x3c, Counter Value: 0
         Parameter 0x3d, Counter Value: 0
         Parameter 0x3e, Counter Value: 0
         Parameter 0x3f, Counter Value: 0
         Parameter 0x40, Counter Value: 0

Device Wellness Parameters (Page 0x33 - Current Cumulative Values):

         Parameter 0x0, Parameter Data: 00 00 1a 68 05 1e 6d e2 01 80 02 00 
                             Sense Key: 0x1 (RECOVERED ERROR - Recovery action performed)
                  Sense Code/Qualifier: (0x80, 0x2) = Cleaning Requested
         Parameter 0x1, Parameter Data: 00 00 1e f0 0e f5 b1 92 01 80 02 00 
                             Sense Key: 0x1 (RECOVERED ERROR - Recovery action performed)
                  Sense Code/Qualifier: (0x80, 0x2) = Cleaning Requested
         Parameter 0x2, Parameter Data: 00 00 1f 13 0e f5 f6 d1 01 80 02 00 
                             Sense Key: 0x1 (RECOVERED ERROR - Recovery action performed)
                  Sense Code/Qualifier: (0x80, 0x2) = Cleaning Requested
         Parameter 0x3, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0x4, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0x5, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0x6, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0x7, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0x8, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0x9, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0xa, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0xb, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0xc, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0xd, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0xe, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 
         Parameter 0xf, Parameter Data: 00 00 00 00 00 00 00 00 00 00 00 00 

Device Status Parameters (Page 0x3E - Current Cumulative Values):

                           Device Type: 65536 (obsolete)
                    Device Status Bits: 0
               Exhausted Cleaning Tape: No
                    Cleaning Requested: No
                     Cleaning Required: No
                       Wellness Status: Not Supported
                    Temperature Status: Not Supported
           Total Number of Loads/Moves: 6765
       Total Number of Cleaning Events: 0
                        Product Number: 0x1050309 (Quantum Sequential DLT/SDLT)

tru64% scu sbtl 1 5 0 \; show log page status param 3

Device Status Parameters (Page 0x3E - Current Cumulative Values):

       Total Number of Cleaning Events: 1

tru64% 
