1
.TH SG_LOGS "8" "December 2005" "sg3_utils-1.19" SG3_UTILS
1
.TH SG_LOGS "8" "June 2006" "sg3_utils-1.21" SG3_UTILS
3
3
sg_logs \- read SCSI device log pages
6
[\fI-a\fR] [\fI-c=<page_control>\fR] [\fI-h\fR] [\fI-H\fR] [\fI-l\fR]
7
[\fI-p=<page_code>\fR] [\fI-paramp=<parameter_pointer>\fR] [\fI-pcb\fR]
8
[\fI-ppc\fR] [\fI-r\fR] [\fI-scum\fR] [\fI-sp\fR] [\fI-sthr\fR] [\fI-t\fR]
9
[\fI-v\fR] [\fI-V\fR] [\fI-?\fR] \fI<scsi_device>\fR
6
[\fI-a\fR] [\fI-A\fR] [\fI-c=<page_control>\fR] [\fI-h\fR] [\fI-H\fR]
7
[\fI-l\fR] [\fI-L\fR] [\fI-p=<page_code>[,<subpage_code]\fR]
8
[\fI-paramp=<parameter_pointer>\fR] [\fI-pcb\fR] [\fI-ppc\fR] [\fI-r\fR]
9
[\fI-scum\fR] [\fI-sp\fR] [\fI-sthr\fR] [\fI-t\fR] [\fI-T\fR] [\fI-v\fR]
10
[\fI-V\fR] [\fI-?\fR] \fI<scsi_device>\fR
11
12
.\" Add any additional description here
13
14
This utility sends a LOG SENSE SCSI command to the given device and then
14
15
outputs the response. This is used in most cases to fetch log pages
15
16
stored on the given device and known log pages are decoded and output
16
in ASCII. In one case a LOG SELECT SCSI command is issued to reset
17
in ASCII. In some cases a LOG SELECT SCSI command is issued to reset
17
18
parameters back to the device manufacturer's default values.
20
In SPC-4 revision 5 a subpage code was introduced to both the LOG
21
SENSE and LOG SELECT command. At the same time a page code field was
22
introduced to the to the LOG SELECT command. The log subpage code
23
can range from 0 to ff (255) inclusive. The subpage code value 'ff'
24
can be thought of as a wildcard.
19
26
Options with arguments or with two or more letters can have an extra '-'
20
27
prepended. For example: both '-pcb' and '--pcb' are acceptable.
23
outputs all the log pages supported by the device.
30
outputs all the log pages supported by the device. This requires
31
a two stage process: first the supported log pages log page is
32
fetched, then for each entry in the response, the corresponding
33
log page is fetched and displayed.
36
outputs all the log pages and subpages supported by the device. This
37
requires a two stage process: first the supported log pages and subpages
38
log page is fetched, then for each entry in the response, the corresponding
39
log page is fetched and displayed.
26
42
accepts 0, 1, 2 or 3 as an argument. 0 for current threshold values,
39
55
lists the names of all logs sense pages supported by this device.
40
56
See the list of common log page codes below.
59
lists the names of all logs sense pages and subpages supported by this
60
device. See the list of common log page codes below.
43
log page code to fetch. Should be a hexadecimal number between 0 and 3f
63
log page code to access. Should be a hexadecimal number between 0 and 3f
64
inclusive. Commonly accessed log pages are listed below.
66
-p=<page_code>,<subpage_code>
67
log page code and subpage code to access. The page code should be a
68
hexadecimal number between 0 and 3f inclusive. The subpage code should be
69
a hexadecimal number between 0 and ff inclusive. The subpage code of 'ff'
70
can be thought of as a wildcard.
46
72
-paramp=<parameter_pointer>
47
73
parameter pointer value (in hex) to place in command. Should be a number
55
81
sets the Parameter Pointer Control (PPC) bit. Default is 0 (i.e. cleared).
58
use LOG SELECT SCSI command (PCR bit) to reset all implemented parameter
59
values to be the device defined (i.e. manufacturer's) default values. In
60
most cases the default values are zeroes. This option seems to clear error
61
counter log pages but leaves pages like self-test results, start-stop
62
cycle counter and temperature log pages unaffected. This option may be
63
required to clear log pages if a counter reaches its maximum value since
64
the log page in which the counter is found will remain "stuck" until
65
something is done. Most other options are ignored.
84
use LOG SELECT SCSI command (PCR bit) to reset the given page or all pages
85
to the implemented parameter values to be the device defined (i.e.
86
manufacturer's) default values. In most cases the default values are zeroes.
87
This option seems to clear error counter log pages but leaves pages like
88
self-test results, start-stop cycle counter and temperature log pages
89
unaffected. This option may be required to clear log pages if a counter
90
reaches its maximum value since the log page in which the counter is found
91
will remain "stuck" until something is done. Most other options are ignored.
92
Prior to SPC-4 revision 5 the LOG SELECT command did not take a page
93
code (or a subpage code).
68
sets all cumulative parameters to their default values. Uses LOG SELECT
69
SCSI command with pc=3 .
96
sets all (or specified log page) cumulative parameters to their default
97
values. Uses LOG SELECT SCSI command with pc=3 .
72
100
sets the Saving Parameters (SP) bit. Default is 0 (i.e. cleared). When
79
107
non-volatile locations.
82
sets the current threshold parameters to the default threshold values.
83
Uses LOG SELECT SCSI command with pc=2 .
110
sets all (or specified log page) current threshold parameters to the default
111
threshold values. Uses LOG SELECT SCSI command with pc=2 .
86
114
outputs the temperature. First looks in the temperature log page and if
87
115
that is not available tries the Informational Exceptions page which may also
88
116
have the current temperature (especially in older disks).
119
outputs the transport ('Protocol specific port') log page. Equivalent
91
123
verbose: show SCSI command blocks prior to execution. '-vv'
92
124
and '-vvv' are also accepted yielding greater verbosity.
151
183
a SCSI generic (sg) device. In the 2.6 series block devices (e.g. disks
152
184
and SCSI DVDs) can also be specified. For example "sg_logs -a /dev/sda"
153
185
will work in the 2.6 series kernels.
187
The exit status of sg_logs is 0 when it is successful. Otherwise see
188
the sg3_utils(8) man page.
155
190
Written by Doug Gilbert
156
191
.SH "REPORTING BUGS"
157
192
Report bugs to <dgilbert at interlog dot com>.
159
Copyright \(co 2002-2005 Douglas Gilbert
194
Copyright \(co 2002-2006 Douglas Gilbert
161
196
This software is distributed under the GPL version 2. There is NO
162
197
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.