JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual     Sun QFS and Sun Storage Archive Manager 5.3 Information Library
search filter icon
search icon

Document Information

Preface

1.  User Commands (Man Pages Section 1)

2.  Maintenance Commands (Man Pages Section 1M)

3.  Library Functions (Man Pages Section 3)

4.  Library Functions (Man Pages Section 3X)

5.  File Formats (Man Pages Section 4)

archiver.cmd(4)

defaults.conf(4)

devlog(4)

diskvols.conf(4)

fsalogd.cmd(4)

ftp.cmd(4)

hosts.fs(4)

hosts.fs.local(4)

inquiry.conf(4)

mcf(4)

notify.cmd(4)

nrecycler.cmd(4)

preview.cmd(4)

recycler.cmd(4)

releaser.cmd(4)

rft.cmd(4)

samdb.conf(4)

samfs.cmd(4)

sefdata(4)

sefsysevent(4)

shrink.cmd(4)

stager.cmd(4)

6.  Standards, Environment, and Macros (Man Pages Section 5)

7.  Device and Network Interfaces (Man Pages Section 7)

sefsysevent(4)

NAME
     sefsysevent - SEF sysevent

SYNOPSIS
     /etc/sysevent/config/SUNW,SUNWsamfs,Device,sysevent.conf

AVAILABILITY
     SUNWsamfs

DESCRIPTION
     In SAM-QFS environments, tape drive SCSI log sense error
     counter pages 2 and 3 for media analysis are available to
     the user via a Solaris sysevent.  SEF (System Error
     Facility) sysevents are enabled by default with a default
     polling interval of once before unload.  SEF sysevents
     behavior is controlled by defaults.conf and samset.

     How to add a sysevent handler for SEF sysevents:

     A simple SEF sysevent handler should be executable and may
     look like this:

     #!/bin/ksh
     echo "$@" >> /var/tmp/xx.dat
     exit 0

     To add the SEF sysevent handler to the syseventd(1M):

     # syseventadm add -vSUNW -pSUNWsamfs -cDevice -sSEF
     /var/tmp/xx \"\$VENDOR\" \"\$PRODUCT\" \"\$USN\" \"\$REV\"
     \$TOD \$EQ_ORD \"\$NAME\" \$INQ_TYPE \"\$MEDIA_TYPE\"
     \"\$VSN\" \$LABEL_TIME \$LP2_PC0 \$LP2_PC1 \$LP2_PC2
     \$LP2_PC3 \$LP2_PC4 \$LP2_PC5 \$LP2_PC6 \$LP3_PC0 \$LP3_PC1
     \$LP3_PC2 \$LP3_PC3 \$LP3_PC4 \$LP3_PC5 \$LP3_PC6 \$WHERE
     \$sequence

     The syseventadm(1M) add command above creates the
     /etc/sysevent/config/SUNW,SUNWsamfs,Device,sysevent.conf
     file and a path to your SEF sysevent handler /var/tmp/xx.
     Note the double quotes are required when using the
     syseventadm(1M) command because the strings can be empty and
     the data is positional.

     To load the SEF sysevent handler:

     # syseventadm restart

     SEF sysevent event handler data looks like this:

     # cat /var/tmp/xx.dat
     "HP      " "Ultrium 2-SCSI  " "HUL2M00585" "F45H" 1094048112 82
     "/dev/rmt/2cbn" 0x1 "li" "000750" 1091738029 0x0 0x0 0x0 0x0 0x0 0x70b1

     0x0 0x0 0x0 0x0 0x322 0x322 0x4645 0x0 0x1 0x282
     "HP      " "Ultrium 2-SCSI  " "HUL2M00617" "F5AH" 1094048116 81
     "/dev/rmt/1cbn" 0x1 "li" "NAB975" 1092691221 0x0 0x0 0x0 0x0 0x0 0x35c
     0x0 0x0 0x0 0x0 0x0 0x0 0x4a 0x0 0x1 0x283

     A C language program to convert time of day $TOD and
     $LABEL_TIME sysevent macros from digits to text:

     #include <stdio.h>
     #include <sys/types.h>
     #include <stdlib.h>
     #include <time.h>

     void main(int argc, char **argv)
     {
              char str[100];
              time_t tm = atol(argv[1]);

              cftime(str, "%C", "tm);
              printf("%s0, str);
     }

     The complied sefsysevent_time program then can be used to
     determine the label time of $VSN 000750.

     # ./sefsysevent_time 1091738029
     Thu Aug  5 14:33:49 MDT 2004

     To change the default polling cycle from once at unload to
     once every five minutes use:

     # samset sef all on 300
     # samset
     device 80: tapealert on and supported, sef not applicable
     device 81: tapealert on and supported, sef on and supported 300s
     device 82: tapealert on and supported, sef on and supported 300s
     device 90: tapealert on and supported, sef on and supported 300s

     Or use /etc/opt/SUNWsamfs/defaults.conf to change the default behavior:
     # cat defaults.conf
     sef=all on 300

     The SEF sysevent macros are available in the
     /opt/SUNWsamfs/include/sefvals.h file.  The following is a
     description of the variables:

     Field     Value

     Class     Device

     Subclass  SEF

     Vendor    SUNW

     Publisher SUNWsamfs

     SEF sysevent handler macros about SAM-QFS configuration and
     the SCSI Log Sense Error Counters for pages 2 and 3 and
     parameters 0-6.

     Name                Value and Data Type

     VENDOR              Inquiry vendor.  Data type is string.

     PRODUCT             Inquiry product.  Data type is string.

     REV                 Inquiry revision.  Data type is string.

     USN                 Inquiry unit serial number.  Data type
                         is string.

     TOD                 Time of day.  Data type is int32.

     EQ_ORD              mcf file Equipment Number.  Data type is
                         int16.

     NAME                Device name.  Data type is string.

     VERSION             Inquiry version.  Data type is byte.

     INQ_TYPE            Inquiry peripheral device type.  Data
                         type is byte.

     MEDIA_TYPE          SAM-QFS media type. Data type is string.

     VSN                 Volume serial name.  Data type is
                         string.

     LABEL_TIME          VSN label timestamp. Data type is
                         integer.

     SET                 mcf file Family Set.  Data type is
                         string.

     FSEQ                mcf file Family Set Equipment Number.
                         Data type is int16.

     WHERE               SEF location poll=1 or unload=0.  Data
                         type is byte.

     Write log sense page 2:

     Name                Value and Data Type

     LP2_PC0             Errors corrected without substantial
                         delay.  Data type is uint32.

     LP2_PC1             Errors corrected with possible delays.
                         Data type is uint32.

     LP2_PC2             Total rewrites.  Data type is uint32.

     LP2_PC3             Total errors corrected.  Data type is
                         uint32.

     LP2_PC4             Total times correction algorithm
                         processed.  Data type is uint32.

     LP2_PC5             Total bytes processed.  Data type is
                         uint64.

     LP2_PC6             Total uncorrected errors.  Data type is
                         uint32.

     Read log sense page 3:

     Name                Value and Data Type

     LP3_PC0             Errors corrected without substantial
                         delay.  Data type is uint32.

     LP3_PC1             Errors corrected with possible delays.
                         Data type is uint32.

     LP3_PC2             Total rereads.  Data type is uint32.

     LP3_PC3             Total errors corrected.  Data type is
                         uint32.

     LP3_PC4             Total times correction algorithm
                         processed.  Data type is uint32.

     LP3_PC5             Total bytes processed.  Data type is
                         uint64.

     LP3_PC6             Total uncorrected errors.  Data type is
                         uint32.

     To do simple media analysis, the captured sef data in the
     /var/tmp/xx.dat file can be formatted for StarOffice
     spreadsheet analysis and graphing.

SEE ALSO
     samset(1M), defaults.conf(4), sefdata(4), sefreport(1M),
     tapealert(1M).