diff options
Diffstat (limited to 'sg_requests.8')
-rw-r--r-- | sg_requests.8 | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/sg_requests.8 b/sg_requests.8 index 5dc7c8e4..1e349a62 100644 --- a/sg_requests.8 +++ b/sg_requests.8 @@ -1,68 +1,70 @@ -.TH SG_REQUESTS "8" "October 2006" "sg3_utils-1.22" SG3_UTILS +.TH SG_REQUESTS "8" "January 2007" "sg3_utils\-1.23" 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--hex\fR] [\fI--num=<n>\fR] -[\fI--raw\fR] [\fI--status\fR] [\fI--time\fR] [\fI--verbose\fR] -[\fI--version\fR] \fI<scsi_device>\fR +[\fI\-\-desc\fR] [\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-num=NUM\fR] +[\fI\-\-raw\fR] [\fI\-\-status\fR] [\fI\-\-time\fR] [\fI\-\-verbose\fR] +[\fI\-\-version\fR] \fIDEVICE\fR .SH DESCRIPTION .\" Add any additional description here .PP -Send REQUEST SENSE command to a SCSI device and output the response -which is expected to be in sense data format. Both fixed and descriptor -format are supported. +Send REQUEST SENSE command to \fIDEVICE\fR and output the response which is +expected to be in sense data format. Both fixed and descriptor format are +supported. +.SH OPTIONS +Arguments to long options are mandatory for short options as well. .TP ---desc | -d -sets the 'DESC' bit in the REQUEST SENSE SCSI command. The given device +\fB\-d\fR, \fB\-\-desc\fR +sets the DESC bit in the REQUEST SENSE SCSI cdb. The \fIDEVICE\fR 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 +will only occur if the \fIDEVICE\fR 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 +\fB\-h\fR, \fB\-\-help\fR output the usage message then exit. .TP ---hex | -H +\fB\-H\fR, \fB\-\-hex\fR output response in ASCII hexadecimal. .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 . +\fB\-n\fR, \fB\-\-num\fR=\fINUM\fR +perform \fINUM\fR SCSI REQUEST SENSE commands, stopping when either \fINUM\fR +is reached or an error occurs. The default value for \fINUM\fR is 1 . .TP ---raw | -r +\fB\-r\fR, \fB\-\-raw\fR output response in binary (to stdout). .TP ---status | -s +\fB\-s\fR, \fB\-\-status\fR if the last REQUEST SENSE finished without error (from SCSI status or -autosense) then the contents of the parameter data is analysed as +autosense) then the contents of the parameter data are analysed as sense data and the exit status is set accordingly. The default action (when this option is not given) is to ignore the contents of the parameter data for the purposes of setting the exit status. -Some types of error set a sense key of "NO SENSE" with non-zero +Some types of error set a sense key of "NO SENSE" with non\-zero information in the additional sense code (e.g. the FAILURE PREDICTION THRESHOLD EXCEEDED group of codes); this results in an exit status value of 10. If the sense key is "NO SENSE" and both asc and ascq are zero then the exit status is set to 0 . See the sg3_utils(8) man page for exit status values. .TP ---time | -t +\fB\-t\fR, \fB\-\-time\fR time the SCSI REQUEST SENSE command(s) and calculate the average number of operations per second. .TP ---verbose | -v +\fB\-v\fR, \fB\-\-verbose\fR 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 +\fB\-V\fR, \fB\-\-version\fR print the version string and then exit. -.PP +.SH NOTES 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-3 rev 23 and SBC-2 rev 16) increase +However recent SCSI drafts (e.g. SPC\-3 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 @@ -71,9 +73,9 @@ 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). +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 EXIT STATUS The exit status of sg_requests is 0 when it is successful. Otherwise see the sg3_utils(8) man page. @@ -82,9 +84,9 @@ Written by Douglas Gilbert. .SH "REPORTING BUGS" Report bugs to <dgilbert at interlog dot com>. .SH COPYRIGHT -Copyright \(co 2004-2006 Douglas Gilbert +Copyright \(co 2004\-2007 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_format(sg3_utils) +.B sg3_utils |