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

NAME

6       sg_sat_read_gplog  -  use  ATA  READ  LOG EXT command via a SCSI to ATA
7       Translation (SAT) layer
8

SYNOPSIS

10       sg_sat_read_gplog [--ck_cond]  [--count=CO]  [--dma]  [--help]  [--hex]
11       [--len={16|12}] [--log=LA] [--page=PN] [--readonly] [--verbose] [--ver‐
12       sion] DEVICE
13

DESCRIPTION

15       This utility sends an ATA READ LOG EXT or an ATA READ LOG DMA EXT  com‐
16       mand  to  the  DEVICE. This command is used to read the general purpose
17       log of (S)ATA disks (not ATAPI devices such as DVD driver). Rather than
18       send  the  READ LOG (DMA) EXT command directly to the device it is sent
19       via a SCSI transport which is assumed to contain a SCSI to ATA Transla‐
20       tion (SAT) Layer (SATL). The SATL may be in an operating system driver,
21       in host bus adapter (HBA) firmware or in some external enclosure.
22
23       This utility does not currently attempt to decode the response from the
24       ATA  disk,  rather it outputs the response in ASCII hexadecimal grouped
25       in 16 bit words. Following ATA conventions those words are decoded lit‐
26       tle  endian  (note that SCSI commands use a big endian representation).
27       In the future this utility may attempt to decode some log  pages,  per‐
28       haps using the --decode option.
29
30       The  SAT-2 standard (SAT ANSI INCITS 465-2010, prior draft: sat2r09.pdf
31       at www.t10.org) defines two SCSI "ATA PASS-THROUGH" commands: one using
32       a 16 byte "cdb" and the other with a 12 byte cdb. This utility defaults
33       to using the 16 byte cdb variant.
34

OPTIONS

36       Arguments to long options are mandatory for short options as well.
37
38       -C, --ck_cond
39              sets the CK_COND bit in  the  ATA  PASS-THROUGH  SCSI  cdb.  The
40              default  setting  is  clear  (i.e.  0). When set the SATL should
41              yield a sense buffer containing a ATA  Result  descriptor  irre‐
42              spective  of  whether  the ATA command succeeded or failed. When
43              clear the SATL should only yield a sense buffer containing a ATA
44              Result descriptor if the ATA command failed.
45
46       -c, --count=CO
47              the number CO is placed in the "count" field in the ATA READ LOG
48              EXT command. This specified the number  of  512-byte  blocks  of
49              data to be read from the specified log.
50
51       -d, --dma
52              use the ATA READ LOG DMA EXT command instead of ATA READ LOG EXT
53              command.  Some devices require this to return valid log data.
54
55       -h, --help
56              outputs the usage message summarizing command line options  then
57              exits.  Ignores DEVICE if given.
58
59       -H, --hex
60              when  given  once,  the  response is output in ASCII hexadecimal
61              bytes. When given twice, then the response is  grouped  into  16
62              bit  words  using  ATA conventions (i.e. little endian); this is
63              the default output (i.e. when this option is  not  given).  When
64              given  thrice  (i.e. '-HHH') the output is in hex, grouped in 16
65              bit words (without a leading offset and trailing ASCII  on  each
66              line),  in  a format that is acceptable for 'hdparm --Istdin' to
67              process.
68
69       -L, --log=LA
70              the number LA is known as the "log address" in the ATA standards
71              and is placed in bits 7:0 of the "lba" field of the ATA READ LOG
72              (DMA) EXT command. This specifies the log to  be  returned  (See
73              ATA-ACS  for  a  detailed  list of available log addresses). The
74              default value placed in the  "lba  field  is  0,  returning  the
75              directory  of  available logs. The maximum value allowed for LOG
76              is 0xff.
77
78       -p, --page=PN
79              the number PN is the page number (within the log address) and is
80              placed  in  bits  32:16  of  the "lba" field of the ATA READ LOG
81              (DMA) EXT command. The default value placed in the  "lba"  field
82              is 0. The maximum value allowed for LOG is 0xffff.
83
84       -l, --len={16|12}
85              this is the length of the SCSI cdb used for the ATA PASS-THROUGH
86              commands.  The argument can either be 16 or 12. The  default  is
87              16. Some SCSI transports cannot convey SCSI commands longer than
88              12 bytes.
89
90       -r, --readonly
91              causes the DEVICE to be opened with the read-only flag (O_RDONLY
92              in  Unix).  The  default  action  is  to  open  DEVICE  with the
93              read-write flag (O_RDWR in Unix). In some  cases  sending  power
94              management  commands  to ATA disks are defeated by OS actions on
95              the close() if the DEVICE was opened with  the  read-write  flag
96              (e.g. the OS might think it needs to flush something to disk).
97
98       -v, --verbose
99              increases the level or verbosity.
100
101       -V, --version
102              print out version string
103

NOTES

105       Prior  to Linux kernel 2.6.29 USB mass storage limited sense data to 18
106       bytes  which  made  the  --ck_cond  option  yield  strange  (truncated)
107       results.
108

EXIT STATUS

110       The exit status of sg_sat_read_gplog is 0 when it is successful. Other‐
111       wise see the sg3_utils(8) man page.
112

AUTHOR

114       Written by Hannes Reinecke and Douglas Gilbert
115

REPORTING BUGS

117       Report bugs to <dgilbert at interlog dot com>.
118
120       Copyright © 2014-2015 Hannes Reinecke, SUSE Linux GmbH
121       This software is distributed under a FreeBSD license. There is NO  war‐
122       ranty;  not  even  for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
123       POSE.
124

SEE ALSO

126       sg_sat_identify(sg3_utils),     sg_inq(sg3_utils),      sdparm(sdparm),
127       hdparm(hdparm)
128
129
130
131sg3_utils-1.41                    April 2015              SG_SAT_READ_GPLOG(8)
Impressum