• Home
  • Raw
  • Download

Lines Matching +full:command +full:- +full:and +full:- +full:control

1 .TH SG_MODES "8" "July 2022" "sg3_utils\-1.45" SG3_UTILS
3 sg_modes \- reads mode pages with SCSI MODE SENSE command
6 [\fI\-\-all\fR] [\fI\-\-control=PC\fR] [\fI\-\-dbd\fR] [\fI\-\-dbout\fR]
7 [\fI\-\-examine\fR] [\fI\-\-flexible\fR] [\fI\-\-help\fR] [\fI\-\-hex\fR]
8 [\fI\-\-list\fR] [\fI\-\-llbaa\fR] [\fI\-\-maxlen=LEN\fR]
9 [\fI\-\-page=PG[,SPG]\fR] [\fI\-\-raw\fR] [\fI\-R\fR] [\fI\-\-readwrite\fR]
10 [\fI\-\-six\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR] [\fIDEVICE\fR]
13 [\fI\-6\fR] [\fI\-a\fR] [\fI\-A\fR] [\fI\-c=PC\fR] [\fI\-d\fR] [\fI\-D\fR]
14 [\fI\-e\fR] [\fI\-f\fR] [\fI\-h\fR] [\fI\-H\fR] [\fI\-l\fR] [\fI\-L\fR]
15 [\fI\-m=LEN\fR] [\fI\-p=PG[,SPG]\fR] [\fI\-r\fR] [\fI\-subp=SPG\fR]
16 [\fI\-v\fR] [\fI\-V\fR] [\fI\-w\fR] [\fI\-?\fR] [\fIDEVICE\fR]
20 This utility sends a MODE SENSE SCSI command to the \fIDEVICE\fR and
21 outputs the response. There is a 6 byte and 10 byte (cdb) variant of the
22 MODE SENSE command, this utility defaults to the 10 byte variant. The SPC\-4
23 standard (and the SPC\-5 standard) include a note stating that implementers
24 should migrate away from the SCSI MODE SELECT(6) and MODE SENSE(6) commands
27 This utility decodes mode page headers and block descriptors but outputs
30 decoded and can be changed by the
34 This utility supports two command line syntaxes, the preferred one is
35 shown first in the synopsis and explained in this section. A later
36 section on the old command line syntax outlines the second group of
39 If no page is given (and \fI\-\-list\fR is not selected) then \fI\-\-all\fR
40 is assumed. The \fI\-\-all\fR option requests all mode pages (but not
45 \fB\-a\fR, \fB\-\-all\fR
48 not fetched. When used twice (e.g. '\-aa'), all mode pages and subpages
49 are requested which is equivalent to '\-\-page=63,255'.
51 \fB\-c\fR, \fB\-\-control\fR=\fIPC\fR
52 \fIPC\fR is the page control value. Up to four different versions of each
64 with a MODE SELECT. The saved values will be re\-instated the next time
68 \fB\-d\fR, \fB\-\-dbd\fR
73 devices may not support this setting and may return an "illegal request"
74 sense key; alternatively they may ignore it. Oddly the Reduced Block Command
77 \fB\-D\fR, \fB\-\-dbout\fR
81 \fB\-e\fR, \fB\-\-examine\fR
86 The sdparm utility which lists mode and VPD pages also has a \fB\-\-examine\fR
89 \fB\-f\fR, \fB\-\-flexible\fR
90 Some devices, bridges and/or drivers attempt crude translations between
91 MODE SENSE 6 and 10 byte commands without correcting the response. This
92 will cause the response to be mis\-interpreted (usually with an error saying
94 is checked, and if it looks wrong, the response is then decoded as if the
97 \fB\-h\fR, \fB\-\-help\fR
100 \fB\-H\fR, \fB\-\-hex\fR
101 The default action is to decode known mode page numbers (and subpage
104 and page control values are output in hex.
107 command is output in hex to stdout without any decoding. This form can
108 be redirected to a file (or piped) and then used 'sdparm \-\-inhex=' to
111 \fB\-l\fR, \fB\-\-list\fR
112 lists all common page and subpage codes and their names that are found in
113 the command set that matches the peripheral type of the given \fIDEVICE\fR.
114 If no \fIDEVICE\fR and no \fI\-\-page=PG\fR is given then the common page and
115 subpage codes and their names are listed for SBC (e.g. a disk). If no
116 \fIDEVICE\fR is given and a \fI\-\-page=PG\fR is given then the
117 common page and subpage codes and their names are listed for the command set
119 example 'sg_mode \-\-list \-\-page=1' lists the command mode pages and
121 is interpreted as a transport identifier and command transport specific mode
122 page codes and their names are listed following the main mode page list.
125 \fB\-L\fR, \fB\-\-llbaa\fR
127 bit is not defined in the MODE SENSE (6) cdb so setting the '\-L'
128 and '\-\-six' options is reported as an error. When set the \fIDEVICE\fR
133 \fB\-m\fR, \fB\-\-maxlen\fR=\fILEN\fR
137 or 252 for MODE SENSE (6). The \fILEN\fR argument must be non\-negative
138 and no greater than 65535 for MODE SENSE (10) and not greater than 255
141 \fB\-O\fR, \fB\-\-old\fR
144 \fB\-p\fR, \fB\-\-page\fR=\fIPG\fR
147 and 63 (inclusive). When not given and a default is required then
151 acronyms can be listed out with the \fI\-\-page=xxx\fR option. They are
154 \fB\-p\fR, \fB\-\-page\fR=\fIPG,SPG\fR
155 page code and subpage code values to fetch. Both arguments are assumed
157 between 0 and 63 inclusive. The subpage code should be between 0 and 255
160 \fB\-r\fR, \fB\-\-raw\fR
161 output the response in binary to stdout. Error messages and warnings, if
162 any, are sent to stderr. When this option is used twice (e.g. '\-rr')
163 then has the same action as '\-R'
165 \fB\-R\fR
170 \fB\-w\fR, \fB\-\-readwrite\fR
171 open \fIDEVICE\fR in "read\-write" mode. Default is to open it in read\-only
174 \fB\-6\fR, \fB\-s\fR, \fB\-\-six\fR
175 by default this utility sends a 10 byte MODE SENSE command to the
177 commands (e.g. SCSI\-2 tape drives). This parameter forces the use of 6
180 \fB\-v\fR, \fB\-\-verbose\fR
183 \fB\-V\fR, \fB\-\-version\fR
186 If the normal sg_modes utility fails with "illegal command
187 operation code" then try the '\-\-six' (or '\-6') option.
189 This utility performs a SCSI INQUIRY command to determine the peripheral
190 type of the device (e.g. 0 \-> Direct Access Device (disk)) prior to
191 sending a MODE SENSE command. This helps in decoding the block
192 descriptor and mode pages.
194 This utility opens \fIDEVICE\fR in read\-only mode (e.g. in Unix, with
195 the O_RDONLY flag) by default. It will open \fIDEVICE\fR in read\-write
196 mode if the \fI\-\-readwrite\fR option is given.
200 and DVD drives) can also be specified. For example "sg_modes \-a /dev/sda"
205 .SH OLDER COMMAND LINE OPTIONS
207 version 1.23 . Since then this utility defaults to the newer command line
208 options which can be overridden by using \fI\-\-old\fR (or \fI\-O\fR) as the
210 force the use of these older command line options.
212 \fB\-6\fR
213 by default this utility sends a 10 byte MODE SENSE command to
215 See \fI\-\-six\fR in the main description.
217 \fB\-a\fR
218 see \fI\-\-all\fR in the main description.
220 \fB\-A\fR
221 output all the mode pages and subpages supported by the \fIDEVICE\fR. Same
222 as '\-\-all \-\-all' in the new syntax.
224 \fB\-c\fR=\fIPC\fR
225 \fIPC\fR is the page control value. See \fB\-\-control\fR=\fIPC\fR in
228 \fB\-d\fR
229 see \fB\-\-dbd\fR in the main description.
231 \fB\-D\fR
232 see \fB\-\-dbout\fR in the main description.
234 \fB\-e\fR
235 see \fB\-\-examine\fR in the main description.
237 \fB\-f\fR
238 see \fB\-\-flexible\fR in the main description.
240 \fB\-h\fR
241 The default action is to decode known mode page numbers (and subpage
242 numbers) into text. With this option mode page numbers (and subpage
245 \fB\-H\fR
246 same action as the '\-h' option.
248 \fB\-l\fR
249 see \fB\-\-list\fR in the main description.
251 \fB\-L\fR
252 see \fB\-\-llbaa\fR in the main description.
254 \fB-N\fR, \fB\-\-new\fR
257 \fB\-m\fR=\fILEN\fR
258 see \fB\-\-maxlen\fR=\fILEN\fR in the main description.
260 \fB\-p\fR=\fIPG\fR
263 3f (fetch all mode pages). Note that an acronym for the page and/or
268 \fB\-p\fR=\fIPG,SPG\fR
269 page code and subpage code values to fetch. The page code should be a
270 hexadecimal number between 0 and 3f inclusive. The subpage code should
271 be a hexadecimal number between 0 and ff inclusive. The default value
274 \fB\-r\fR
279 \fB\-subp\fR=\fISPG\fR
280 sub page code to fetch. Should be a hexadecimal number between 0 and
283 \fB\-v\fR
286 \fB\-V\fR
289 \fB\-w\fR
290 see \fB\-\-readwrite\fR in the main description.
292 \fB\-?\fR
296 can be given. When it is present this utility will expect the older command
298 using \fI\-\-old\fR (or \fI\-O\fR) as the first command line option.
304 Copyright \(co 2000\-2022 Douglas Gilbert