1SG_SAT_PHY_EVENT(8)                SG3_UTILS               SG_SAT_PHY_EVENT(8)
2
3
4

NAME

6       sg_sat_phy_event - use ATA READ LOG EXT via a SAT pass-through to fetch
7       SATA phy event counters
8

SYNOPSIS

10       sg_sat_phy_event [--ck_cond]  [--extend]  [--help]  [--hex]  [--ignore]
11       [--len={16|12}] [--raw] [--reset] [--verbose] [--version] DEVICE
12

DESCRIPTION

14       This  utility  sends  an ATA READ LOG EXT with the log page ("address")
15       set to 11h to DEVICE and outputs the response. Log page 11h is  defined
16       in  the  SATA 2.5 standard and contains phy event counters. Rather than
17       send this command directly to the DEVICE, are sent via a SCSI transport
18       which  is  assumed  to  contain  a  SCSI to ATA Translation (SAT) Layer
19       (SATL). The SATL may be in an operating  system  driver,  in  host  bus
20       adapter firmware or in some external enclosure.
21
22       The SAT standard (SAT ANSI INCITS 431-2007, prior draft: sat-r09.pdf at
23       www.t10.org) defines two SCSI "ATA PASS-THROUGH" commands: one using  a
24       16  byte  "cdb" and the other with a 12 byte cdb. This utility defaults
25       to using the 16 byte cdb variant. SAT-2 is also a standard: SAT-2  ANSI
26       INCITS  465-2010 and the draft prior to that is sat2r09.pdf . The SAT-3
27       project has started and the most recent draft is sat3r01.pdf .
28

OPTIONS

30       Arguments to long options are mandatory for short options as well.
31
32       -c, --ck_cond
33              sets the CK_COND bit in the ATA PASS-THROUGH SCSI cdb.  The  de‐
34              fault  setting is clear (i.e. 0). When set the SATL should yield
35              a sense buffer containing a ATA Result  descriptor  irrespective
36              of  whether the command succeeded or failed. When clear the SATL
37              should only yield a sense buffer containing  a  ATA  Result  de‐
38              scriptor if the command failed.
39
40       -e, --extend
41              sets  the  EXTEND  bit in the ATA PASS-THROUGH SCSI cdb. The de‐
42              fault setting is clear (i.e. 0). When set a 48 bit  LBA  command
43              is sent to the device. This option has no effect when --len=12.
44
45       -h, --help
46              outputs  the usage message summarizing command line options then
47              exits. Ignores DEVICE if given.
48
49       -H, --hex
50              outputs the ATA READ LOG EXT response in hex. The default action
51              (i.e.  without  any  '-H'  options) is to output the response in
52              hex, grouped in 16 bit words (i.e. the  ATA  standard's  prefer‐
53              ence).   When  given  once,  the response is output in ASCII hex
54              bytes (i.e. the SCSI standard's preference).  When  given  twice
55              (i.e.  '-HH') the output is in hex, grouped in 16 bit words, the
56              same as the default but without a header.
57
58       -i, --ignore
59              usually the phy counter identifier names are decoded. When  this
60              option  is given, the numeric value of the identifier is output,
61              the vendor flag, the data length (in bytes) and the  correspond‐
62              ing value.
63
64       -l, --len={16|12}
65              this is the length of the SCSI cdb used for the ATA PASS-THROUGH
66              commands.  The argument can either be 16 or 12. The  default  is
67              16.  The  larger cdb size is needed for 48 bit LBA addressing of
68              ATA devices. On the other hand some SCSI transports cannot  con‐
69              vey SCSI commands longer than 12 bytes.
70
71       -r, --raw
72              output  the  ATA  READ  LOG  EXT  response in binary. The output
73              should be piped to a file or another utility when this option is
74              used.   The  binary  is  sent  to stdout, and errors are sent to
75              stderr.
76
77       -R, --reset
78              reset the counters after the current values  are  returned,  de‐
79              coded and displayed.
80
81       -v, --verbose
82              increases the level or verbosity.
83
84       -V, --version
85              print out version string
86

NOTES

88       The  SCSI ATA PASS-THROUGH (12) command's opcode is 0xa1 and it clashes
89       with the MMC set's BLANK command used by cd/dvd writers. So a  SATL  in
90       front of an ATAPI device that uses MMC (i.e. has peripheral device type
91       5) probably should treat opcode 0xa1 as a BLANK  command  and  send  it
92       through to the cd/dvd drive. The ATA PASS-THROUGH (16) command's opcode
93       (0x85) does not clash with anything so it is a better choice.
94
95       In the 2.4 series of Linux kernels the DEVICE must be  a  SCSI  generic
96       (sg)  device.  In  the  2.6  series block devices (e.g. disks and ATAPI
97       DVDs) can also be specified. For example "sg_inq /dev/sda" will work in
98       the  2.6  series  kernels. From lk 2.6.6 other SCSI "char" device names
99       may be used as well (e.g. "/dev/st0m"). Prior to  lk  2.6.29  USB  mass
100       storage  limited sense data to 18 bytes which made the --ck_cond option
101       yield strange (truncated) results.
102

EXIT STATUS

104       The exit status of sg_sat_identify is 0 when it is  successful.  Other‐
105       wise see the sg3_utils(8) man page.
106

AUTHOR

108       Written by Douglas Gilbert
109

REPORTING BUGS

111       Report bugs to <dgilbert at interlog dot com>.
112
114       Copyright © 2006-2020 Douglas Gilbert
115       This  software is distributed under a FreeBSD license. There is NO war‐
116       ranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR  PUR‐
117       POSE.
118

SEE ALSO

120       sg_sat_identify,sg_sat_read_gplog(sg3_utils),
121       smp_rep_phy_err_log(smp_utils),sdparm(sdparm),hdparm(hdparm)
122
123
124
125sg3_utils-1.46                     July 2020               SG_SAT_PHY_EVENT(8)
Impressum