~ubuntu-branches/ubuntu/intrepid/sg3-utils/intrepid

« back to all changes in this revision

Viewing changes to sginfo.8

  • Committer: Bazaar Package Importer
  • Author(s): Luk Claes
  • Date: 2006-11-05 17:23:29 UTC
  • mfrom: (1.1.4 upstream) (3.1.2 edgy)
  • Revision ID: james.westby@ubuntu.com-20061105172329-l4loha00sk36qz6k
* Non-maintainer upload.
* Fix FTBFS due to old syscall usage (Closes: #395512).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH SGINFO "8" "August 2004" "sg3_utils-1.08" SG3_UTILS
 
1
.TH SGINFO "8" "September 2005" "sg3_utils-1.17" SG3_UTILS
2
2
.SH NAME
3
3
sginfo \- access mode page information for a SCSI (or ATAPI) device
4
4
.SH SYNOPSIS
10
10
.\" Add any additional description here
11
11
.PP
12
12
sginfo is a port of the Linux scsiinfo program by Eric Youngdale. It 
13
 
uses SCSI generic (sg) devices. In some cases the high level device 
14
 
name (i.e. sd, sr, st, osst, or hd) can also be used. The primary role
15
 
of this program is to access mode page information. If permitted,
 
13
uses SCSI generic (sg) devices; however in some cases the high level
 
14
device name (i.e. sd, sr, st, osst, or hd) can also be used. The primary
 
15
role of this program is to access mode page information. If permitted,
16
16
mode page information can be altered. In addition information from
17
17
the INQUIRY and READ DEFECTS commands are also available.
18
18
.PP
 
19
Those interested in SCSI mode pages may find the sdparm utility
 
20
easier use, especially for changing parameters. 
 
21
.PP
19
22
Four sets of values are maintained by a SCSI device for each mode
20
23
page: current (active), default (manufacturer's supplied values),
21
24
saved (values that are retained if the SCSI device is powered down),
25
28
or "-m" (modifiable (i.e. changeable)).
26
29
.PP
27
30
Many mode pages are decoded: for disks (see SBC-2), for CD/DVDs (see
28
 
MMC-2/3/4), for tapes (see SSC-2) and for enclosures (see SES-2).
 
31
MMC-2/3/4/5), for tapes (see SSC-2) and for enclosures (see SES-2).
29
32
Some mode pages common to all SCSI peripheral device types are defined
30
 
in SPC-3 (primary commands). A decoded mode page has its field names
 
33
in SPC-4 (primary commands). A decoded mode page has its field names
31
34
in the first column and the corresponding value in the second column.
32
35
A "hex" mode page (and subpage) has its byte position in the first 
33
36
column (in hex and starting at 0x2) and the corresponding hex value
82
85
.TP
83
86
-Farg
84
87
Format of the defect lists:
85
 
                -Flogical  - logical blocks
 
88
                -Flogical  - logical block addresses (32 bit)
 
89
                -Flba64    - logical block addresses (64 bit)
86
90
                -Fphysical - physical blocks
87
91
                -Findex    - defect bytes from index
88
92
                -Fhead     - sort by head 
116
120
-P
117
121
Access information in the Power Condition mode page.
118
122
.TP
 
123
-r
 
124
Display all raw (or primary) SCSI device names visible in the /dev
 
125
directory. Examples are /dev/sda, /dev/st1 and /dev/scd2. Does not
 
126
list sg device names so devices such as a SCSI enclosure which only
 
127
have an sg device name are not listed.
 
128
.TP
119
129
-s
120
130
Display information in the unit serial number page which is a
121
131
INQUIRY command variant.
244
254
When a mode page is "replaced" the default action is to change both the 
245
255
current page and the saved page. [For some reason versions of sginfo and
246
256
scsiinfo prior to 2.0 did not change the "saved" page.] To change only
247
 
the cuurent mode page but not the coresponding saved page use the "-N" 
 
257
the current mode page but not the corresponding saved page use the "-N" 
248
258
option.
249
259
.PP
250
260
.SH GENERATING SCRIPT FILES AND HEX PAGES
251
261
The "-aX" or "-AX" option generates output suitable for a script file.
252
262
Mode pages are output in list format (after the INQUIRY and serial
253
263
number) one page per line. To facilitate running the output as (part
254
 
of) a script file to assert chosen modpe page values, each line is 
 
264
of) a script file to assert chosen mode page values, each line is 
255
265
prefixed by "sginfo -t <pn>[,<spn>] -XR ". When such a script
256
266
file is run, it will have the effect of re-asserting the mode
257
267
page values to what they were when the "-aX" generated the output.
278
288
.PP
279
289
.SH REFERENCES
280
290
SCSI (draft) standards can be found at http://www.t10.org . The relevant
281
 
documents are SPC-3 (primary mode pages), SBC-2 (direct access
282
 
devices [e.g. disks]), MMC-4 (CDs and DVDs) and SSC-2 (tapes).
 
291
documents are SPC-4 (mode pages common to all device types),
 
292
SBC-2 (direct access devices [e.g. disks]), MMC-4 (CDs and DVDs) and
 
293
SSC-2 (tapes).
283
294
.PP
284
295
.SH AUTHORS
285
296
Written by Eric Youngdale, Michael Weller, Douglas Gilbert, Kurt Garloff,
290
301
The most recent version of scsiinfo is version 1.7 with the last patches
291
302
by Michael Weller. sginfo is derived from scsiinfo and uses the sg
292
303
interface to get around the 4 KB buffer limit in scsiinfo that cramped
293
 
the diplay of defect lists especially. sginfo was written by Douglas 
 
304
the display of defect lists especially. sginfo was written by Douglas 
294
305
Gilbert with patches from Kurt Garloff. This manpage corresponds with
295
306
version 2.01 of sginfo. It may be backported (or just copied) soon to
296
307
become scsiinfo 2.01 .
297
308
.PP
298
309
This software is distributed under the GPL version 2. There is NO
299
310
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
311
.SH "SEE ALSO"
 
312
.B plscsi(internet), scsiinfo(internet), sg_modes(sg3_utils),
 
313
.B sg_inq(sg3_utils), sdparm(sdparm)
 
314
.PP
 
315
plscsi can send arbitrary (user supplied) SCSI commands; scsiinfo is the
 
316
predecessor of this utility; sg_modes is a low level MODE SENSE based
 
317
utility and sg_inq is specialized for the mandatory SCSI INQUIRY
 
318
command which contains a lot of information about advanced devices.
 
319
Users may find sdparm more convenient for getting and setting mode
 
320
page parameters.