Lines Matching +full:command +full:- +full:and +full:- +full:control
1 .TH SG_LOGS "8" "November 2022" "sg3_utils\-1.48" SG3_UTILS
3 sg_logs \- access log pages with SCSI LOG SENSE command
6 [\fI\-\-ALL\fR] [\fI\-\-all\fR] [\fI\-\-brief\fR] [\fI\-\-exclude\fR]
7 [\fI\-\-filter=FL\fR] [\fI\-\-full\fR] [\fI\-\-hex\fR] [\fI\-\-json[=JO]\fR]
8 [\fI\-\-list\fR] [\fI\-\-maxlen=LEN\fR] [\fI\-\-name\fR] [\fI\-\-no_inq\fR]
9 [\fI\-\-page=PG\fR] [\fI\-\-paramp=PP\fR] [\fI\-\-pcb\fR] [\fI\-\-ppc\fR]
10 [\fI\-\-pdt=DT\fR] [\fI\-\-raw\fR] [\fI\-\-readonly\fR] [\fI\-\-sp\fR]
11 [\fI\-\-temperature\fR] [\fI\-\-transport\fR] [\fI\-\-undefined\fR]
12 [\fI\-\-vendor=VP\fR] [\fI\-\-verbose\fR] \fIDEVICE\fR
15 \fI\-\-in=FN\fR [\fI\-\-brief\fR] [\fI\-\-exclude\fR] [\fI\-\-filter=FL\fR]
16 [\fI\-\-full\fR] [\fI\-\-hex\fR] [\fI\-\-json[=JO]\fR] [\fI\-\-name\fR]
17 [\fI\-\-page=PG\fR] [\fI\-\-pdt=DT\fR] [\fI\-\-raw\fR] [\fI\-\-undefined\fR]
18 [\fI\-\-vendor=VP\fR]
21 \fI\-\-select\fR [\fI\-\-control=PC\fR] [\fI\-\-page=PG\fR] [\fI\-\-raw\fR]
22 [\fI\-\-reset\fR] [\fI\-\-sp\fR] [\fI\-\-verbose\fR] \fIDEVICE\fR
25 \fI\-\-enumerate\fR [\fI\-\-filter=FL\fR] [\fI\-\-help\fR]
26 [\fI\-\-vendor=VP\fR] [\fI\-\-version\fR]
29 [\fI\-a\fR] [\fI\-A\fR] [\fI\-b\fR] [\fI\-c=PC\fR] [\fI\-D=DT\fR] [\fI\-e\fR]
30 [\fI\-E\fR] [\fI\-f=FL\fR] [\fI\-F\fR] [\fI\-h\fR] [\fI\-H\fR] [\fI\-i=FN\fR]
31 [\fI\-l\fR] [\fI\-L\fR] [\fI\-m=LEN\fR] [\fI\-M=VP\fR] [\fI\-n\fR]
32 [\fI\-p=PG\fR] [\fI\-paramp=PP\fR] [\fI\-pcb\fR] [\fI\-ppc\fR] [\fI\-r\fR]
33 [\fI\-R\fR] [\fI\-select\fR] [\fI\-sp\fR] [\fI\-t\fR] [\fI\-T\fR] [\fI\-u\fR]
34 [\fI\-v\fR] [\fI\-V\fR] [\fI\-?\fR] [\fI\-x\fR] \fIDEVICE\fR
38 This utility sends a SCSI LOG SENSE command to the \fIDEVICE\fR and then
39 outputs the response. The LOG SENSE command is used to fetch log pages which,
40 if known, are decoded by default. When the \fI\-\-reset\fR and/or
41 \fI\-\-select\fR option is given then a SCSI LOG SELECT command is issued
43 a file read using the \fI\-\-in=FN\fR option; in this case those responses
44 are decoded and the \fIDEVICE\fR argument, if given, is ignored.
46 In SPC\-4 revision 5 the subpage code was introduced to both the LOG SENSE and
47 LOG SELECT command. At the same time a page code field was introduced to the
48 to the LOG SELECT command. The log subpage code can range from 0 to 255 (0xff)
52 shows the options that can be used to send a LOG SENSE command to the
53 \fIDEVICE\fR and decode its response. The second form fetches data from a
54 file (named \fIFN\fR) and decodes it as if it were a response from a LOG
55 SENSE command. The third form shows the options that can be used to send a
56 LOG SELECT command. The fourth form groups various management options.
57 The last form shows the older, deprecated command line interface which is
61 this utility with the \fI\-\-list\fR option. In that case the names of the
67 \fB\-A\fR, \fB\-\-ALL\fR
68 fetch and decode all the log pages and subpages supported by the \fIDEVICE\fR.
69 This requires a two stage process: first the "supported log pages and
71 corresponding log page (or subpage) is fetched and displayed. Note that there
72 are many SCSI devices that do not support LOG SENSE subpages and respond
75 Since some vendors don't list all log pages in the "supported log pages and
76 subpages" log page, the '\-lll' option can be given in addition. This will
80 The long option may also appear as \fB\-\-All\fR.
82 This option overrides the \fI\-\-page=PG\fR if the latter is also given.
84 \fB\-a\fR, \fB\-\-all\fR
87 each entry in its response, the corresponding log page is fetched and
88 displayed. When used twice (e.g. '\-aa') all log pages and subpages are
91 This option overrides the \fI\-\-page=PG\fR if the latter is also given.
93 \fB\-b\fR, \fB\-\-brief\fR
96 \fI\-\-brief\fR is given.
98 \fB\-c\fR, \fB\-\-control\fR=\fIPC\fR
111 \fB\-e\fR, \fB\-\-enumerate\fR
113 tables about known log pages including their name, acronym and fields. If
114 given, the \fIDEVICE\fR argument is ignored. When given once (e.g. '\-e')
121 The \fI\-\-filter=FL\fR and \fI\-\-verbose\fR options reduce the output
124 \fB\-E\fR, \fB\-\-exclude\fR
125 this option excludes vendor specific pages and parameters from the output.
126 Trying to decode vendor specific pages and parameters does not necessarily
127 work well for many reasons. This option limits the output to pages and
133 \fB\-f\fR, \fB\-\-filter\fR=\fIFL\fR
135 peripheral device type (pdt) (or other) if \fI\-\-enumerate\fR is given.
137 In the parameter code case \fIFL\fR is a value between 0 and 65535 (0xffff)
139 \fB\-\-hex\fR option is given the log parameter is output in hexadecimal
140 rather than decoding it. If the \fB\-\-hex\fR option is used twice then the
141 leading address on each line of hex is removed. If the \fB\-\-raw\fR option
144 convention are those pages that list supported log pages (and subpages).
146 In the \fI\-\-enumerate\fR case, when \fIFL\fR >= zero it is taken as a
147 pdt value and only log pages associated with that pdt plus generic pages
148 listed in SPC are enumerated. If \fIFL\fR is \-1 then the filter does
149 nothing which is the same as not giving this option; when \fIFL\fR is \-2
150 then only generic pages listed in SPC are enumerated. If \fIFL\fR is \-10
152 \fIFL\fR is \-11 then only generic tape like pages (e.g. includes ADC)
155 \fB\-F\fR, \fB\-\-full\fR
162 \fB\-h\fR, \fB\-\-help\fR
165 \fB\-H\fR, \fB\-\-hex\fR
166 The default action is to decode known log page numbers (and subpage numbers)
171 file might later be used by another invocation using the \fI\-\-in=FN\fR
174 A weaker form of this option, called \fI\-\-undefined\fR, handles the
178 \fB\-i\fR, \fB\-\-in\fR=\fIFN\fR
180 \fI\-\-select\fR to send a LOG SELECT command to the given \fIDEVICE\fR;
185 SENSE command (i.e. a log page). For decoding the page and subpage numbers
187 generic (i.e. from SPC) or the value given by \fI\-\-pdt=DT\fR.
189 \fIFN\fR is treated as a file name (or '\-' for stdin) which contains ASCII
192 comma separated. Anything from and including a hash mark to the end of line
193 is ignored. If the \fI\-\-raw\fR option is also given then \fIFN\fR is
199 \fB\-j\fR, \fB\-\-json[\fR=\fIJO\fR]
203 \fB\-l\fR, \fB\-\-list\fR
207 log pages and subpages" log page is output. Some vendors do not list some
210 three times (e.g. '\-lll') and the output of the two log pages is merged.
211 Even if the "supported log pages and subpages" log page is not supported
216 The '\-lll' form may be useful with the \fI\-\-ALL\fR option to show the
218 the "supported log page and subpage" log pages.
220 \fB\-m\fR, \fB\-\-maxlen\fR=\fILEN\fR
225 values and 1 for \fILEN\fR are not accepted. Responses can be quite
226 large (e.g. the background scan results log page) and this option can be used
229 The default \fILEN\fR is 65532 unless the \fI\-\-in=FN\fR option is given;
232 \fB\-n\fR, \fB\-\-name\fR
234 contains no space and may be abbreviated and the value is decimal unless
238 This option is superseded by the \fI\-\-json[=JO]\fR option. If both are
241 \fB\-x\fR, \fB\-\-no_inq\fR
243 INQUIRY command for the standard response. The default (assuming some other
247 If this option is given twice (or more) then no INQUIRY command is sent
253 \fB\-O\fR, \fB\-\-old\fR
256 \fB\-p\fR, \fB\-\-page\fR=\fIPG\fR
259 \fI\-\-enumerate\fR option. Page (0 to 63) and subpage (0 to 255) numbers
266 used to fetch the Supported subpages log page (e.g. \-\-page=temp,0xff).
268 \fB\-P\fR, \fB\-\-paramp\fR=\fIPP\fR
271 expected. When a value greater than 0 is given the \fI\-\-ppc\fR option
277 \fB\-q\fR, \fB\-\-pcb\fR
278 show Parameter Control Byte settings (only relevant when log parameters
279 being output in ASCII). This byte includes the DU and TSD bits plus
280 the 'Format and linking' field (2 bits wide).
282 \fB\-D\fR, \fB\-\-pdt\fR=\fIDT\fR
285 the \fI\-\-pdt=DT\fR without a \fIDEVICE\fR (e.g. when \fI\-\-in=FN\fR
286 is used) and when \fI\-\-no_inq\fR is used with a \fIDEVICE\fR.
288 \fIDT\fR may be -1 which is the default value. This value may select any
291 \fB\-Q\fR, \fB\-\-ppc\fR
292 sets the Parameter Pointer Control (PPC) bit in the LOG SENSE cdb. Default
293 is 0 (i.e. cleared). This bit was made obsolete in SPC\-4 revision 18.
295 \fB\-r\fR, \fB\-\-raw\fR
296 output the response in binary to stdout. Error messages and warnings are
299 This option may also be given together with \fI\-\-in=FN\fR in which case
300 the contents of \fIFN\fR are interpreted as binary data (and the response is
303 \fB\-R\fR, \fB\-\-readonly\fR
304 open the \fIDEVICE\fR read\-only (e.g. in Unix with the O_RDONLY flag). The
305 default action is to try and open \fIDEVICE\fR read\-write then if that
306 fails try to open again with read\-only. However when a read\-write open
308 try to do a SYNCHRONIZE CACHE command). So this option forces a read\-only
309 open on \fIDEVICE\fR and if it fails, this utility will exit. Note that
310 options like \fI\-\-select\fR most likely need a read\-write open.
312 \fB\-R\fR, \fB\-\-reset\fR
313 use SCSI LOG SELECT command (with the PCR bit set) to reset the all log
315 SP bit (i.e. \fI\-\-sp\fR option which defaults to 0) and the
316 \fIPC\fR ("page control") value (which defaults to 1). Supplying this option
317 implies the \fI\-\-select\fR option as well. This option seems to clear error
318 counter log pages but leaves pages like self\-test results, start\-stop cycle
319 counter and temperature log pages unaffected. This option may be required to
324 \fB\-S\fR, \fB\-\-select\fR
325 use a LOG SELECT command. The default action (i.e. when neither this option
326 nor \fI\-\-reset\fR is given) is to do a LOG SENSE command. See the LOG
329 \fB\-s\fR, \fB\-\-sp\fR
332 indicated by the DS and TSD parameter codes) in some non\-volatile location.
335 control mode page which causes the \fIDEVICE\fR to periodically save all
336 saveable log parameters to non\-volatile storage.
338 \fB\-t\fR, \fB\-\-temperature\fR
339 outputs the temperature. First looks in the temperature log page and if
343 \fB\-T\fR, \fB\-\-transport\fR
345 setting '\-\-page=18h'.
347 \fB\-u\fR, \fB\-\-undefined\fR
348 to see fields decoded, the \fI\-\-hex\fR option cannot be used. However some
349 fields are not defined in the T10 documents and in that case they are output
352 \fI\-\-hex\fR option. For example '\-uu' will output undefined fields in
355 \fB\-M\fR, \fB\-\-vendor\fR=\fIVP\fR
360 For example SPC\-5 defines parameter code 0x0 of page 0x2f (the Informational
361 Exceptions log page) and states that the remaining parameter codes (i.e. 0x1
365 If this option is used with \fI\-\-page=PG\fR and \fIPG\fR is an acronym
370 \fB\-v\fR, \fB\-\-verbose\fR
371 increase level of verbosity. When used with \fI\-\-enumerate\fR, in the
375 \fB\-V\fR, \fB\-\-version\fR
378 The SCSI LOG SELECT command can be used to reset certain parameters to vendor
379 specific defaults, save them to non\-volatile storage (i.e. the media), or
380 supply new page contents. This command has changed between SPC\-3 and SPC\-4
381 with the addition of the Page and Subpage Code fields which can only be
384 The \fI\-\-select\fR (or \fI\-\-reset\fR) option is required to issue a LOG
385 SELECT command. If the \fI\-\-in=FN\fR option is not given (or \fIFN\fR is
387 the \fI\-\-in=FN\fR option is is given then its decoded data is placed in
388 the data\-out buffer and its length in bytes is placed in the Parameter list
391 Other options that are active with the LOG SELECT command are
392 \fI\-\-control=PC\fR, \fI\-\-reset\fR (which sets the PCR bit) and
393 \fI\-\-sp\fR.
404 provided with the \fI\-\-in=FN\fR option. A typical prefix would
407 some later time with '\-\-page=0xf \-\-filter=0x<n>'.
410 SENSE command. The first fetch requests a 4 byte response (i.e. place 4 in
413 on the second fetch. This is typical practice in SCSI and guaranteed to
415 those devices using the \fI\-\-maxlen=LEN\fR option will do a single fetch.
419 stop cycles since the device was produced and the results of the last
422 sg_logs in a form suitable for monitoring the health of SCSI disks and
426 to use the \fI\-\-enumerate\fR option. Some page names are known but there
428 when the \fI\-\-verbose\fR option is given with \fI\-\-enumerate\fR.
430 Vendors are specifically permitted by the SPC\-6 to _not_ report all pages
432 that report a list of supported pages and subpages. One guarantee which is
437 .SH OLDER COMMAND LINE OPTIONS
439 version 1.23 . Since then this utility defaults to the newer command line
440 options which can be overridden by using \fI\-\-old\fR (or \fI\-O\fR) as the
442 force the use of these older command line options.
444 Options with arguments or with two or more letters can have an extra '\-'
445 prepended. For example: both '\-pcb' and '\-\-pcb' are acceptable.
447 \fB\-a\fR
449 Equivalent to \fI\-\-all\fR in the main description.
451 \fB\-A\fR
452 outputs all the log pages and subpages supported by the \fIDEVICE\fR.
453 Equivalent to \fI\-\-ALL\fR in the main description.
455 \fB\-c\fR=\fIPC\fR
456 Equivalent to \fI\-\-control=PC\fR in the main description.
458 \fB\-D\fR=\fIDT\fR
459 Equivalent to \fI\-\-pdt=DT\fR in the main description.
461 \fB\-e\fR
463 Equivalent to \fI\-\-enumerate\fR in the main description.
465 \fB\-E\fR
466 Equivalent to \fI\-\-exclude\fR in the main description.
468 \fB\-h\fR
469 suppresses decoding of known log sense pages and prints out the
472 \fB\-i\fR=\fIFN\fR
473 \fIFN\fR is treated as a file name (or '\-' for stdin) which contains ASCII
475 LOG SELECT command. See the LOG SELECT section.
477 \fB\-H\fR
478 same action as '\-h' in this section and equivalent to \fI\-\-hex\fR in
481 \fB\-l\fR
483 Equivalent to \fI\-\-list\fR in the main description.
485 \fB\-L\fR
486 lists the names of all logs sense pages and subpages supported by this
487 \fIDEVICE\fR. Equivalent to '\-\-list \-\-list' in the main description.
489 \fB\-m\fR=\fILEN\fR
492 a leading '0x' or trailing 'h'. Equivalent to \fI\-\-maxlen=LEN\fR in
495 \fB\-M\fR=\fIVP\fR
496 Equivalent to \fI\-\-vendor=VP\fR in the main description.
498 \fB\-n\fR
499 Equivalent to \fI\-\-name\fR in the main description.
501 \fB\-N\fR, \fB\-\-new\fR
504 \fB\-p\fR=\fIPG\fR
507 \fI\-\-enumerate\fR option. Page (0 to 3f) and subpage (0 to ff) numbers
510 \fB\-paramp\fR=\fIPP\fR
511 \fIPP\fR is the parameter pointer value (in hex) to place in command.
512 Should be a number between 0 and ffff inclusive.
514 \fB\-pcb\fR
515 show Parameter Control Byte settings (only relevant when log parameters
518 \fB\-ppc\fR
519 sets the Parameter Pointer Control (PPC) bit. Default is 0 (i.e. cleared).
521 \fB\-r\fR
522 use SCSI LOG SELECT command (PCR bit set) to reset the all log pages (or
523 the given page). Equivalent to \fI\-\-reset\fR in the main description.
525 \fB\-R\fR
526 Equivalent to \fI\-\-readonly\fR in the main description.
528 \fB\-select\fR
529 use a LOG SELECT command. Equivalent to \fI\-\-select\fR in the main
532 \fB\-sp\fR
534 Equivalent to \fI\-\-sp\fR in the main description.
536 \fB\-t\fR
537 outputs the temperature. Equivalent to \fI\-\-temperature\fR in the main
540 \fB\-T\fR
542 to \fI\-\-transport\fR in the main description.
544 \fB\-v\fR
547 \fB\-V\fR
550 \fB\-x\fR
551 suppress the INQUIRY command. Equivalent to \fI\-\-no_inq\fR in the main
554 \fB\-?\fR
558 can be given. When it is present this utility will expect the older command
560 using \fI\-\-old\fR (or \fI\-O\fR) as the first command line option.
566 Copyright \(co 2002\-2022 Douglas Gilbert