diff options
Diffstat (limited to 'doc/sg3_utils.8')
-rw-r--r-- | doc/sg3_utils.8 | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/doc/sg3_utils.8 b/doc/sg3_utils.8 index 5fcbf759..abe07d82 100644 --- a/doc/sg3_utils.8 +++ b/doc/sg3_utils.8 @@ -1,4 +1,4 @@ -.TH SG3_UTILS "8" "November 2021" "sg3_utils\-1.47" SG3_UTILS +.TH SG3_UTILS "8" "November 2021" "sg3_utils\-1.48" SG3_UTILS .SH NAME sg3_utils \- a package of utilities for sending SCSI commands .SH SYNOPSIS @@ -34,8 +34,8 @@ of the diagram. The highest level (i.e. most abstract) document is the SCSI Architecture Model (SAM) with SAM\-5 being the most recent standard (ANSI INCITS 515\-2016) with the most recent draft being SAM\-6 revision 4 . SCSI commands in common with all device types can be found in SCSI Primary -Commands (SPC) of which SPC\-4 is the most recent standard (ANSI INCITS -513-2015). The most recent SPC draft is SPC\-5 revision 21. Block device +Commands (SPC) of which SPC\-5 is the most recent standard (ANSI INCITS +502-2020). The most recent SPC draft is SPC\-6 revision 6. Block device specific commands (e.g. as used by disks) are in SBC, those for tape drives in SSC, those for SCSI enclosures in SES and those for CD/DVD/BD drives in MMC. @@ -64,7 +64,7 @@ options can be elided, for example: '\-all' is equivalent to '\-a \-l \-l'. The \fIDEVICE\fR argument may appear after, between or prior to any options. .PP The older utilities, including as sg_inq, sg_logs, sg_modes, sg_opcode, -sg_rbuff, sg_readcap, sg_senddiag, sg_start and sg_turs had individual +sg_rbuff, sg_readcap, sg_senddiag, sg_start and sg_turs had individual command line processing code typically based on a single "\-" followed by one or more characters. If an argument is needed then it follows a "=" ( e.g. '\-p=1f' in sg_modes with its older interface). Various options can be @@ -575,10 +575,14 @@ option requests hexadecimal output. In these cases the '\-?' option will output the usage message then exit. .TP \fB\-H\fR, \fB\-\-hex\fR -for SCSI commands that yield a non\-trivial response, print out that -response in ASCII hexadecimal. To produce hexadecimal that can be parsed -by other utilities (e.g. without a relative address to the left and without -trailing ASCII) use this option three or four times. +for SCSI commands that yield a non\-trivial response, print out that response +in ASCII hexadecimal. When used once, 16 bytes are printed on each line, +prefixed by an relative address, starting at 0 (hex). When used twice, an +ASCII rendering of the 16 bytes is appended to each line, with non printeble +characters replaced by a '.' . When used three times only the 16 hex bytes +are printed on each line (hence no address prefix nor ASCII appended). To +produce hexadecimal that can be parsed by other utilities use this option +three or four times. .TP \fB\-i\fR, \fB\-\-in\fR=\fIFN\fR many SCSI commands fetch a significant amount of data (returned in the @@ -744,6 +748,12 @@ containing a hash mark ('#') is ignored from that point until the end of that line. Users are encouraged to use hash marks to introduce comments in hex files. The author uses the extension'.hex' on such files. Examples can be found in the 'inhex' directory. +.PP +The hexadecimal format described in the previous paragraph can be converted +to binary using the sg_decode_sense utility with these +options: "\fI\-\-inhex=HFN \-\-nodecode \-\-write=WFN\fR". The input (in +hex) is in the \fIHFN\fR file while the output is placed in the \fIWFN\fR +file. .SH MICROCODE AND FIRMWARE There are two standardized methods for downloading microcode (i.e. device firmware) to a SCSI device. The more general way is with the SCSI WRITE @@ -777,7 +787,7 @@ https://sg.danny.cz/sg/device_name.html . There is a git code mirror at https://github.com/hreinecke/sg3_utils . The principle code repository uses subversion and is on the author's equipment. The author keeps track of this via the subversion revision number which is an ascending integer -(currently at 774 for this package). The github mirror gets updated +(currently at 922 for this package). The github mirror gets updated periodically from the author's repository. Depending on the time of update, the above Downloads section at sg.danny.cz may be more up to date than the github mirror. @@ -796,4 +806,5 @@ code, namely sg_lib.[hc], sg_cmds_basic.[hc] and sg_cmds_extra.[hc] are under a FreeBSD license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH "SEE ALSO" -.B sdparm(sdparm), ddpt(ddpt), lsscsi(lsscsi), dmesg(1), mt(1) +.B sg_decode_sense(sg3_utils), sdparm(sdparm), ddpt(ddpt), lsscsi(lsscsi), +.B dmesg(1), mt(1) |