|
NAMEsg_turs - send one or more SCSI TEST UNIT READY commandsSYNOPSISsg_turs [--help] [--low] [--num=NUM] [--number=NUM] [--progress] [--time] [--verbose] [--version] DEVICEsg_turs [-n=NUM] [-p] [-t] [-v] [-V] DEVICE DESCRIPTIONThis utility sends one or more SCSI TEST UNIT READY commands to the DEVICE. This may be useful for timing the per command overhead. Note that TEST UNIT READY has no associated data, just a 6 byte command (with each byte a zero) and a returned SCSI status value.This utility supports two command line syntaxes, the preferred one is shown first in the synopsis and explained in this section. A later section on the old command line syntax outlines the second group of options. OPTIONSArguments to long options are mandatory for short options as well.
NOTESThe progress indication is optionally part of the sense data. When a prior command that takes a long time to complete (and typically precludes other media access commands) is still underway, the progress indication can be used to determine how long before the device returns to its normal state. Around SPC-3 T10 changed the preferred command for polling the progress indication from TEST UNIT READY to REQUEST SENSE (see the sg_requests utilty).The SCSI FORMAT command for disks used with the IMMED bit set is an example of an operation that takes a significant amount of time and precludes other media access during that time. The IMMED bit set instructs the FORMAT command to return control to the application client once the format has commenced (see SBC-3). Several long duration SCSI commands associated with tape drives also use the progress indication (see SSC-3). The DEVICE is opened with a read-only flag (e.g. in Unix with the O_RDONLY flag). Early standards suggested that the SCSI TEST UNIT READY command be used for polling the progress indication. More recent standards seem to suggest the SCSI REQUEST SENSE command should be used instead. EXIT STATUSThe exit status of sg_turs is 0 when it is successful (e.g. in the case of a mechanical disk, it is spun up and ready to accept commands). For this utility the other exit status of interest is 2 corresponding to the "not ready" sense key. For other exit status values see the sg3_utils(8) man page.OLDER COMMAND LINE OPTIONSThe options in this section were the only ones available prior to sg3_utils version 1.23 . Since then this utility defaults to the newer command line options which can be overridden by using --old (or -O) as the first option. See the ENVIRONMENT VARIABLES section for another way to force the use of these older command line options.
ENVIRONMENT VARIABLESSince sg3_utils version 1.23 the environment variable SG3_UTILS_OLD_OPTS can be given. When it is present this utility will expect the older command line options. So the presence of this environment variable is equivalent to using --old (or -O) as the first command line option.AUTHORSWritten by D. GilbertCOPYRIGHTCopyright © 2000-2019 Douglas GilbertThis software is distributed under the GPL version 2. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SEE ALSOsg_inq, sg_requests (sg3_utils)
Visit the GSP FreeBSD Man Page Interface. |