NAME
sg_start - starts (spins-up) or stops (spins down) SCSI devices
SYNOPSIS
sg_start
[
-d] [
-imm=0|1] [
-loej] [
-pc=<n>]
[
-s] [
-V] [
0|1]
<sg_device>
DESCRIPTION
sg_start sends a START STOP UNIT SCSI command to the given device with
the selected options. The most used options are "0" to spin down a disk
and "1" to spin up a disk. Using "sg_start 1 /dev/sg0" on a disk that
is already spinning is harmless.
- -d
-
outputs some extra debug information associated with executing this command
- -imm=0|1
-
when the immediate bit is 1 (default) then this command (and hence this
utility) return immediately after the device has received the command.
When this switch is 0 then the command returns when the action it
requests has been completed.
- -loej
-
load the media when the unit is started or eject it when the unit is
stopped. This option is ignored if 'pc > 0'. Default is off (i.e. don't
attempt to load or eject media). Obviously only makes sense with
removable media.
- -pc=<n>
-
set the 'power conditions' value (in hex); 0 to f (inclusive) are valid.
When '-pc=0' then the start value (i.e. 0 or 1) and '-loej' are active.
See recent SBC-2 or SAS drafts at www.t10.org for meaning.
- -s
-
send the SYNCHRONIZE CACHE SCSI command to the device prior to sending the
START STOP UNIT command.
- -V
-
print out version string then exit.
- 0
-
stop (spin-down) given device. Active when '-pc=0' or is not given.
- 1
-
start (spin-up) given device. Active when '-pc=0' or is not given.
In the 2.4 series of Linux kernels the given device must be
a SCSI generic (sg) device. In the 2.6 series block devices (e.g. disks
and SCSI DVDs) can also be specified. For example "sg_start 0 /dev/sda"
will work in the 2.6 series kernels.
AUTHOR
Written by K. Garloff and D. Gilbert
REPORTING BUGS
Report bugs to <
dgilbert@interlog.com>.
COPYRIGHT
Copyright © 2002-2003 Kurt Garloff, Douglas Gilbert
This software is distributed under the GPL version 2. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SEE ALSO
sg_senddiag(sg3_utils)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- AUTHOR
-
- REPORTING BUGS
-
- COPYRIGHT
-
- SEE ALSO
-