1
- .TH SG_DECODE_SENSE "8" "August 2014 " "sg3_utils\- 1.40 " SG3_UTILS
1
+ .TH SG_DECODE_SENSE "8" "April 2016 " "sg3_utils\- 1.43 " SG3_UTILS
2
2
.SH NAME
3
3
sg_decode_sense \- decode SCSI sense data
4
4
.SH SYNOPSIS
5
5
.B sg_decode_sense
6
- [\fI \-\- binary=FN \fR ] [\fI \-\- file=FN \fR ] [\fI \-\- help \fR ]
6
+ [\fI \-\- binary=FN \fR ] [\fI \-\- cdb \fR ] [ \fI \-\- file=FN \fR ] [\fI \-\- help \fR ]
7
7
[\fI \-\- hex \fR ] [\fI \-\- nospace \fR ] [\fI \-\- status=SS \fR ]
8
8
[\fI \-\- verbose \fR ] [\fI \-\- version \fR ] [\fI \-\- write=WFN \fR ]
9
9
[H1 H2 H3 ...]
10
10
.SH DESCRIPTION
11
11
.\" Add any additional description here
12
12
This utility takes SCSI sense data in binary or as a sequence of
13
13
ASCII hexadecimal bytes and decodes it. The primary reference for the
14
- decoding is SPC\- 3 ANSI INCITS 408-2005 and the most recent draft
15
- SPC\- 4 revision 37 which can be found at http://www.t10.org and other
14
+ decoding is SPC\- 4 ANSI INCITS 513-2015 and the most recent draft
15
+ SPC\- 5 revision 8 which can be found at http://www.t10.org and other
16
16
locations on the internet.
17
17
.PP
18
18
SCSI sense data is often found in kernel log files as a result of
@@ -22,20 +22,29 @@ Sense data could be up to 252 bytes long but typically is much shorter
22
22
than that, 18 bytes long is often seen and is usually associated with
23
23
the older "fixed" format sense data.
24
24
.PP
25
- The sense data can be provided on the command line or in a file. If
26
- given on the command line the sense data should be a sequence of
27
- hexadecimal bytes separated by space. Alternatively a file can be
28
- given with the contents in binary or ASCII hexadecimal bytes. The
29
- latter form can contain several lines each with none, one or more
30
- ASCII hexadecimal bytes separated by space (comma or tab). The
31
- hash symbol may appear and it and the rest of the line is ignored
32
- making it useful for comments.
25
+ The sense data can be provided on the command line or in a file. If given
26
+ on the command line the sense data should be a sequence of hexadecimal bytes
27
+ separated by space. Alternatively a file can be given with the contents in
28
+ binary or ASCII hexadecimal bytes. The latter form can contain several lines
29
+ each with none, one or more ASCII hexadecimal bytes separated by
30
+ space (comma or tab). The hash symbol may appear and it and the rest of the
31
+ line is ignored making it useful for comments.
32
+ .PP
33
+ If the \fI \-\- cdb \fR option is given then rather than viewing the given hex
34
+ arguments as sense data, it is viewed as a SCSI command descriptor
35
+ block (CDB). In this case the command name is printed out. That name is
36
+ based on the first hex byte given (know as the opcode) and optionally on
37
+ another field called the "service action".
33
38
.SH OPTIONS
34
39
Arguments to long options are mandatory for short options as well.
35
40
.TP
36
41
\fB \- b \fR , \fB \-\- binary \fR =\fI FN \fR
37
42
the sense data is read in binary from a file called \fI FN \fR .
38
43
.TP
44
+ \fB \- c \fR , \fB \-\- cdb \fR
45
+ treat the given string of hex arguments as bytes in a SCSI CDB and
46
+ decode the command name.
47
+ .TP
39
48
\fB \- h \fR , \fB \-\- help \fR
40
49
output the usage message then exit.
41
50
.TP
@@ -123,7 +132,7 @@ Written by Douglas Gilbert.
123
132
.SH "REPORTING BUGS"
124
133
Report bugs to <dgilbert at interlog dot com>.
125
134
.SH COPYRIGHT
126
- Copyright \(co 2010\- 2014 Douglas Gilbert
135
+ Copyright \(co 2010\- 2016 Douglas Gilbert
127
136
.br
128
137
This software is distributed under a FreeBSD license. There is NO
129
138
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
0 commit comments