aboutsummaryrefslogtreecommitdiff
path: root/sg_logs.8
blob: 9ce7279c1a9bede1d51e64ca5dee5c8a818c3095 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
.TH SG_LOGS "8" "October 2004" "sg3_utils-1.09" SG3_UTILS
.SH NAME
sg_logs \- read SCSI device log pages and some log modifications
.SH SYNOPSIS
.B sg_logs
[\fI-a\fR] [\fI-c=<page_control>\fR] [\fI-h\fR] [\fI-l\fR]
[\fI-p=<page_code>\fR] [\fI-paramp=<parameter_pointer>\fR] [\fI-pcb\fR]
[\fI-ppc\fR] [\fI-r\fR] [\fI-sp\fR] [\fI-t\fR] [\fI-v\fR] [\fI-V\fR]
[\fI-?\fR] \fI<scsi_device>\fR
.SH DESCRIPTION
.\" Add any additional description here
.PP
This utility sends a LOG SENSE SCSI command to the given device and then
outputs the response. This is used in most cases to fetch log pages
stored on the given device and known log pages are decoded and output
in ASCII. In one case a LOG SELECT SCSI command is issued to reset
parameters back to the device manufacturer's default values.
this utility.
.TP
-a
outputs all the log pages supported by the device.
.TP
-c=page_control
accepts 0, 1, 2 or 3 as an argument. 0 for current threshhold values,
1 for current cumulative values, 2 for default threshhold values and 3
for default cumulative values. The default is 1 (i.e. current threshhold
values).
.TP
-h
suppresses decoding of known log sense pages and prints out the
response in hex instead.
.TP
-l
lists the names of all logs sense pages supported by this device.
.TP
-p=<page_code>
log page code to fetch. Should be a hexadecimal number between 0 and 3f
inclusive.
.TP
-paramp=<parameter_pointer>
parameter pointer value (in hex) to place in command. Should be a number
between 0 and ffff inclusive. 
.TP
-pcb
show Parameter Control Byte settings (only relevant when log parameters
being output in ASCII).
.TP
-ppc
sets the Parameter Pointer Control (PPC) bit. Default is 0 (i.e. cleared).
.TP
-r
use LOG SELECT SCSI command to reset all implemented parameters to be
the target defined (i.e. manufacturer's) default values.
.TP
-sp
sets the Saving Parameters (SP) bit. Default is 0 (i.e. cleared).
.TP
-t
outputs the temperature. First looks in the temperature log page and if
that is not available tries the Informational Exceptions page which may also
have the current temperature (especially in older disks).
.TP
-v
verbose: show SCSI command blocks prior to execution.
.TP
-V
print out version string
.TP
-?
output usage message. Ignore all other parameters.
.PP
Various log pages hold information error rates, device temperature,
start stop cycles since device produced and the results of the last
20 self tests. Self tests can be initiated by the sg_senddiag utility.
The smartmontools package provides much of the information found with
sg_logs in a form suitable for monitoring the health of SCSI disks and
tape drives.
.PP
In the 2.4 series of Linux kernels the given device must be
a SCSI generic (sg) device. In the 2.6 series block devices (e.g. disks
and SCSI DVDs) can also be specified. For example "sg_logs -a /dev/sda"
will work in the 2.6 series kernels.
.SH AUTHOR
Written by Doug Gilbert
.SH "REPORTING BUGS"
Report bugs to <dgilbert at interlog dot com>.
.SH COPYRIGHT
Copyright \(co 2002-2004 Douglas Gilbert
.br
This software is distributed under the GPL version 2. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.SH "SEE ALSO"
.B smartctl(smartmontools: see net), sg_senddiag(sg3_utils)