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

NAME

6       sg_requests - send one or more SCSI REQUEST SENSE commands
7

SYNOPSIS

9       sg_requests  [--desc]  [--help]  [--hex] [--num=NUM] [--raw] [--status]
10       [--time] [--verbose] [--version] DEVICE
11

DESCRIPTION

13       Send REQUEST SENSE command to DEVICE and output the response  which  is
14       expected  to  be in sense data format. Both fixed and descriptor format
15       are supported.
16

OPTIONS

18       Arguments to long options are mandatory for short options as well.
19
20       -d, --desc
21              sets the DESC bit in the REQUEST  SENSE  SCSI  cdb.  The  DEVICE
22              should  return sense data in descriptor (rather than fixed) for‐
23              mat. This will only occur if the  DEVICE  recognizes  descriptor
24              format  (SPC-3  and later). If the device is pre SPC-3 then set‐
25              ting a bit in a reserved field may cause a check condition  sta‐
26              tus with an illegal request sense key.
27
28       -h, --help
29              output the usage message then exit.
30
31       -H, --hex
32              output response in ASCII hexadecimal.
33
34       -n, --num=NUM
35              perform  NUM  SCSI  REQUEST SENSE commands, stopping when either
36              NUM is reached or an error occurs. The default value for NUM  is
37              1 .
38
39       -r, --raw
40              output response in binary (to stdout).
41
42       -s, --status
43              if the last REQUEST SENSE finished without error (from SCSI sta‐
44              tus or autosense) then the contents of the  parameter  data  are
45              analysed  as  sense data and the exit status is set accordingly.
46              The default action (when this option is not given) is to  ignore
47              the  contents  of the parameter data for the purposes of setting
48              the exit status.  Some types of error set a  sense  key  of  "NO
49              SENSE"  with  non-zero  information in the additional sense code
50              (e.g. the FAILURE PREDICTION THRESHOLD EXCEEDED group of codes);
51              this  results in an exit status value of 10. If the sense key is
52              "NO SENSE" and both asc and ascq are zero then the  exit  status
53              is set to 0 . See the sg3_utils(8) man page for exit status val‐
54              ues.
55
56       -t, --time
57              time the SCSI REQUEST SENSE command(s) and calculate the average
58              number of operations per second.
59
60       -v, --verbose
61              increase the level of verbosity, (i.e. debug output).  Addition‐
62              ally the response (if received) is output in ASCII-HEX. Use this
63              option multiple times for greater verbosity.
64
65       -V, --version
66              print the version string and then exit.
67

NOTES

69       In  SCSI 1 and 2 the REQUEST SENSE command was very important for error
70       and warning processing in SCSI. The autosense capability rendered  this
71       command almost superfluous.
72
73       However  recent  SCSI  drafts  (e.g.  SPC-3  rev  23  and SBC-2 rev 16)
74       increase the utility of the REQUEST SENSE  command.  Idle  and  standby
75       power  conditions  can  now  be  detected with this command; a progress
76       indication is given during FORMAT (when that command was  started  with
77       with  IMMED=1  in  its parameter header); and the Filemark, ILI and EOM
78       bits may be set (e.g. by a tape drive). Interestingly the sense key  is
79       set  to "no sense" while the asc/ascq code convey the information (e.g.
80       0x5e/0x4 "Standby condition activated by command").
81
82       The REQUEST SENSE command is not marked as mandatory in SPC-3 (i.e. for
83       all SCSI devices) but is marked as mandatory in SBC-2 (i.e. for disks),
84       SSC-3 (i.e. for tapes) and MMC-4 (i.e. for CD/DVD drives).
85

EXIT STATUS

87       The exit status of sg_requests is 0 when it  is  successful.  Otherwise
88       see the sg3_utils(8) man page.
89

AUTHORS

91       Written by Douglas Gilbert.
92

REPORTING BUGS

94       Report bugs to <dgilbert at interlog dot com>.
95
97       Copyright © 2004-2007 Douglas Gilbert
98       This  software is distributed under a FreeBSD license. There is NO war‐
99       ranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR  PUR‐
100       POSE.
101

SEE ALSO

103       sg3_utils
104
105
106
107sg3_utils-1.23                   January 2007                   SG_REQUESTS(8)
Impressum