Lines Matching +full:command +full:- +full:and +full:- +full:control
1 .TH SGINFO "8" "January 2014" "sg3_utils\-1.38" SG3_UTILS
3 sginfo \- access mode page information for a SCSI (or ATAPI) device
18 addition information from the INQUIRY and READ DEFECTS commands are also
22 like \fI\-l\fR (to list devices) are broken in recent versions of
23 Linux (e.g. 2.6 series and later); the lsscsi(8) utility can be used
25 adds and modifies mode page fields. Those interested in SCSI mode pages
28 utility more up to date and easier use, especially for changing parameters.
35 shown. This can be overridden by "\-M" (defaults), "\-S" (saved)
36 or "\-m" (modifiable (i.e. changeable)).
38 Many mode pages are decoded: for disks (see SBC\-2), for CD/DVDs (see
39 MMC\-2/3/4/5), for tapes (see SSC\-2) and for enclosures (see SES\-2).
41 in SPC\-4 (primary commands). A decoded mode page has its field names
42 in the first column and the corresponding value in the second column.
43 A "hex" mode page (and subpage) has its byte position in the first
44 column (in hex and starting at 0x2) and the corresponding hex value
45 in the second column. Decoded pages can be viewed with the '\-t' option
47 Naturally decoded pages must be supplied by the \fIDEVICE\fR and
49 may be modified. All mode pages (and subpages) that the device supports
50 can be viewed in hex (and potentially modified) via the "\-u" option
54 includes the vendor, product and revision level of the device.
57 \fB\-6\fR
58 Perform 6 byte MODE SENSE and MODE SELECT commands; by default the
61 \fB\-a\fR
62 Display some INQUIRY data and the unit serial number followed by
64 the '\-t 0x3f' option. If the mode page is known then it is output
67 \fB\-A\fR
68 Display some INQUIRY data and the unit serial number followed by
69 all mode pages and all mode subpages reported by the device.
70 It is similar to the '\-t 0x3f,0xff' option. If a mode (sub)page
74 \fB\-c\fR
77 \fB\-C\fR
78 Access information in the Control mode Page.
80 \fB\-d\fR
83 \fB\-D\fR
84 Access information in the Disconnect\-Reconnect mode page.
86 \fB\-e\fR
89 \fB\-E\fR
90 Access information in the Control Extension mode page.
92 \fB\-f\fR
95 \fB\-F\fR\fIarg\fR
97 \-Flogical \- logical block addresses (32 bit)
98 \-Flba64 \- logical block addresses (64 bit)
99 \-Fphysical \- physical blocks
100 \-Findex \- defect bytes from index
101 \-Fhead \- sort by head
103 Used in conjunction with "\-d" or "\-G". If a format is not given "index" is
106 \fB\-g\fR
109 \fB\-G\fR
112 \fB\-i\fR
113 Display the response to a standard INQUIRY command.
115 \fB\-I\fR
118 \fB\-l\fR
119 Deprecated. Only use in old versions of Linux (e.g. 2.4 and
120 earlier). Please use lsscsi(8) in the Linux 2.6 series and
123 \fB\-n\fR
124 Access information in the Notch and Partition mode page.
126 \fB\-N\fR
128 page (by default changes go to the current and the saved page).
129 Only active when used together with '\-R'.
131 \fB\-P\fR
134 \fB\-r\fR
136 directory. Examples are /dev/sda, /dev/st1 and /dev/scd2. Does not
140 \fB\-s\fR
142 INQUIRY command variant.
144 \fB\-t\fR \fIPN\fR[,\fISPN\fR]
145 Display information from mode page number \fIPN\fR (and optionally sub
148 \fISPN\fR is the mode subpage number and is assumed to be 0 if not given.
151 page 0 which, if present, is last. Page 0 is vendor specific and not
153 both \fIPN\fR and \fISPN\fR (both prefixed by '0x').
155 \fB\-T\fR
157 SCSI commands are shown (in hex) and any errors from these SCSI commands are
158 spelt out (i.e. with a decoded and raw sense buffer). When used twice, the
159 additional data sent with mode select and the response from mode sense are
162 \fB\-u\fR \fIPN\fR[,\fISPN\fR]
163 Display information from mode page number \fIPN\fR (and optionally \fISPN\fR)
165 inclusive. \fISPN\fR is the mode subpage number and is assumed to be 0 if
168 except for page 0 which, if present, is last. Page 0 is vendor specific and
170 for both \fIPN\fR and \fISPN\fR (both prefixed by '0x'). For example 63 and
173 \fB\-v\fR
178 \fB\-V\fR
184 \fB\-z\fR
185 do a single fetch for mode pages (over\-estimating the expected length
194 \fB\-m\fR
197 \fB\-M\fR
200 \fB\-S\fR
205 \fB\-X\fR
206 Display output values in a list. Make them suitable for editing and
207 being given back to the '\-R' (replace command).
209 \fB\-R\fR
210 Replace parameters \- best used with \-X (expert use only)
213 parameters. Taking the control page as an example, first list it out
214 normally (e.g. "sginfo \-C /dev/sda") and
216 to the other lines output). Then execute the same sginfo command with
217 the "\-X" option added; this will output the parameter values in a
218 single row in the same relative positions as the previous command. Now
219 execute "sginfo \-CXR /dev/sda ..." with the "..." replaced by the
220 single row of values output by the previous command, with the relevant
223 $ sginfo \-C /dev/sda
225 Control mode page (0xa)
227 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
237 [Actually the Control page has more parameters that shown above.] Next
240 $ sginfo \-CX /dev/sda
244 Let us assume that the GLTSD bit is to be cleared. The command that
247 $ sginfo \-CXR /dev/sda 0 0 0 0
249 The same number of parameters output by the "\-CX" command needs to be
250 placed at the end of the "\-CXR" command line (after the device name).
253 $ sginfo \-C /dev/sda
255 Control mode page (0xa)
257 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
268 current page and the saved page. [For some reason versions of sginfo and
270 the current mode page but not the corresponding saved page use the "\-N"
273 .SH GENERATING SCRIPT FILES AND HEX PAGES
274 The "\-aX" or "\-AX" option generates output suitable for a script file.
275 Mode pages are output in list format (after the INQUIRY and serial
278 prefixed by "sginfo \-t \fIPN\fR[,\fISPN\fR] \-XR ". When such a script
279 file is run, it will have the effect of re\-asserting the mode
280 page values to what they were when the "\-aX" generated the output.
282 All mode pages (and subpages) supported by the device can be accessed via
283 the \-t and \-u options. To see all
284 mode pages supported by the device use "\-u 63". [To see all mode pages
285 and all subpages use "\-u 63,255".] To list the control mode page in
286 hex (mode page index in the first column and the corresponding byte
287 value in the second column) use "\-u 0xa". Mode pages (subpage code == 0)
289 If the "\-Xu ..." option is used then a list a hex values each value
291 with the "\-RXu ..." option.
294 The SCSI MODE SENSE command yields block descriptors as well as a mode
295 page(s). This utility ignores block descriptors and does not display
296 them. The "disable block descriptor" switch (DBD) in the MODE SENSE command
298 values are being changed (the "\-R" option), the same block descriptor
299 obtained by reading the mode page (i.e. via a MODE SENSE command) is sent
300 back when the mode page is written (i.e. via a MODE SELECT command).
304 documents are SPC\-4 (mode pages common to all device types),
305 SBC\-2 (direct access devices [e.g. disks]), MMC\-4 (CDs and DVDs) and
306 SSC\-2 (tapes).
315 by Michael Weller. sginfo is derived from scsiinfo and uses the sg