aboutsummaryrefslogtreecommitdiff
path: root/sg_requests.8
blob: 3d8b81ac6bd978f7defe7523ec173fc2272f7fd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.TH SG_REQUESTS "8" "March 2006" "sg3_utils-1.20" SG3_UTILS
.SH NAME
sg_requests \- send one or more SCSI REQUEST SENSE commands
.SH SYNOPSIS
.B sg_requests
[\fI--desc\fR] [\fI--help\fR] [\fI--num=<n>\fR] [\fI--time\fR]
[\fI--verbose\fR] [\fI--version\fR] \fI<scsi_device>\fR
.SH DESCRIPTION
.\" Add any additional description here
.PP
Send REQUEST SENSE command to a Linux SCSI device and output the response
which is expected to be in sense data format. Both fixed and descriptor
format are supported.
.TP
--desc | -d
sets the 'DESC' bit in the REQUEST SENSE SCSI command. The given device
should return sense data in descriptor (rather than fixed) format. This
will only occur if the given device recognizes descriptor format (SPC-3
and later). If the device is pre SPC-3 then setting a bit in a reserved
field may cause a check condition status with an illegal request sense key.
.TP
--help | -h
output the usage message then exit.
.TP
--num=<n> | -n <n>
perform <n> SCSI REQUEST SENSE commands, stopping whe either <n> is
reached or an error occurs. The default value for <n> is 1 .
.TP
--time | -t
time the SCSI REQUEST SENSE command(s) and calculate the average number
of operations per second.
.TP
--verbose | -v
increase the level of verbosity, (i.e. debug output).
Additionally the response (if received) is output in ASCII-HEX. Use
this option multiple times for greater verbosity.
.TP
--version | -V
print the version string and then exit.
.PP
In SCSI 1 and 2 the REQUEST SENSE command was very important for error
and warning processing in SCSI. The autosense capability rendered this
command almost superfluous.
.PP
However recent SCSI drafts (e.g. SPC rev 23 and SBC-2 rev 16) increase
the utility of the REQUEST SENSE command. Idle and standby power
conditions can now be detected with this command; a progress indication
is given during FORMAT (when that command was started with with IMMED=1
in its parameter header); and the Filemark, ILI and EOM bits may be
set (e.g. by a tape drive). Interestingly the sense key is set 
to "no sense" while the asc/ascq code convey the information (e.g.
0x5e/0x4 "Standby condition activated by command").
.PP
The REQUEST SENSE command is not marked as mandatory in SPC-3 (i.e. for
all SCSI devices) but is marked as mandatory in SBC-2 (i.e. for disks),
SSC-3 (i.e. for tapes) and MMC-4 (i.e. for CD/DVD drives).
.SH AUTHORS
Written by Douglas Gilbert.
.SH "REPORTING BUGS"
Report bugs to <dgilbert at interlog dot com>.
.SH COPYRIGHT
Copyright \(co 2004-2006 Douglas Gilbert
.br
This software is distributed under a FreeBSD license. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.SH "SEE ALSO"
.B sg_inq