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

NAME

6       sg_turs - send one or more SCSI TEST UNIT READY commands
7

SYNOPSIS

9       sg_turs   [--help]  [--number=NUM]  [--progress]  [--time]  [--verbose]
10       [--version] DEVICE
11
12       sg_turs [-n=NUM] [-p]  [-t] [-v] [-V] DEVICE
13

DESCRIPTION

15       This utility sends one or more SCSI TEST UNIT  READY  commands  to  the
16       DEVICE.  This  may be useful for timing the per command overhead.  Note
17       that TEST UNIT READY has no associated data, just a 6 byte command  and
18       a returned SCSI status value.
19
20       This  utility  supports two command line syntaxes, the preferred one is
21       shown first in the synopsis and explained in this section. A later sec‐
22       tion  on  the  old  command  line  syntax  outlines the second group of
23       options.
24

OPTIONS

26       Arguments to long options are mandatory for short options as well.
27
28       -h, --help
29              print out the usage message then exit.
30
31       -n, --number=NUM
32              performs TEST UNIT READY NUM times. If not given defaults to  1.
33              These  suffix  multipliers  are  permitted:  c C *1; w W *2; b B
34              *512; k K  KiB  *1,024;  KB  *1,000;  m  M  MiB  *1,048,576;  MB
35              *1,000,000; g G GiB *1,073,741,824; and GB *1,000,000,000 . Also
36              a suffix of the form "x<n>" multiplies  the  leading  number  by
37              <n>. Alternatively a hex number may be given, prefixed by either
38              '0x' or has a trailing 'h'.
39
40       -O, --old
41              Switch to older style options. Please use as first option.
42
43       -p, --progress
44              show progress indication (a percentage) if available. If  --num‐
45              ber=NUM  is given, NUM is greater than 1 and an initial progress
46              indication was detected  then  this  utility  waits  30  seconds
47              before  subsequent  checks.   Exits when NUM is reached or there
48              are no more progress indications.  Ignores  --time  option.  See
49              NOTES section below.
50
51       -t, --time
52              after  completing  the  requested number of TEST UNIT READY com‐
53              mands, outputs the total duration and the average number of com‐
54              mands executed per second.
55
56       -v, --verbose
57              increase level or verbosity.
58
59       -V, --version
60              print version string then exit.
61

NOTES

63       The  progress  indication  is optionally part of the sense data. When a
64       prior command that takes a long time to complete  (and  typically  pre‐
65       cludes  other  media  access  commands) is still underway, the progress
66       indication can be used to determine how long before the device  returns
67       to its normal state.
68
69       The  SCSI  FORMAT  command  for disks used with the IMMED bit set is an
70       example of an operation that takes a significant  amount  of  time  and
71       precludes  other  media  access  during  that  time.  The IMMED bit set
72       instructs the FORMAT command  to  return  control  to  the  application
73       client once the format has commenced (see SBC-3). Several long duration
74       SCSI commands associated with tape drives also use the progress indica‐
75       tion (see SSC-3).
76
77       Early standards suggested that the SCSI TEST UNIT READY command be used
78       for polling the progress indication. More recent standards seem to sug‐
79       gest the SCSI REQUEST SENSE command should be used instead.
80

EXIT STATUS

82       The exit status of sg_turs is 0 when it is successful (e.g. in the case
83       of a mechanical disk, it is spun up and ready to accept commands).  For
84       this  utility  the  other exit status of interest is 2 corresponding to
85       the "not ready" sense  key.  For  other  exit  status  values  see  the
86       sg3_utils(8) man page.
87

OLDER COMMAND LINE OPTIONS

89       The  options  in  this  section  were  the only ones available prior to
90       sg3_utils version 1.23 . In sg3_utils  version  1.23  and  later  these
91       older  options can be selected by either setting the SG3_UTILS_OLD_OPTS
92       environment variable or using '--old' (or '-O) as the first option.
93
94       -n=NUM performs TEST UNIT READY NUM times. If not given defaults to  1.
95              Equivalent to --number=NUM in the main description.
96
97       -N, --new
98              Switch to the newer style options.
99
100       -p     show  progress  indication (a percentage) if available.  Equiva‐
101              lent to --progress in the main description.
102
103       -t     after completing the requested number of TEST  UNIT  READY  com‐
104              mands, outputs the total duration and the average number of com‐
105              mands executed per second.  Equivalent to  --time  in  the  main
106              description.
107
108       -v     increase level of verbosity.
109
110       -V     print out version string then exit.
111

AUTHORS

113       Written by D. Gilbert
114
116       Copyright © 2000-2012 Douglas Gilbert
117       This  software is distributed under the GPL version 2. There is NO war‐
118       ranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR  PUR‐
119       POSE.
120

SEE ALSO

122       sg_inq, sg_request (sg3_utils)
123
124
125
126sg3_utils-1.35                   December 2012                      SG_TURS(8)
Impressum