aboutsummaryrefslogtreecommitdiff
path: root/sg_logs.8
blob: 08414d2be5e8178b40c3cd6f75ca2a814e9cc36f (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
.TH SG_LOGS "8" "March 2003" "sg3_utils-1.03" SG3_UTILS
.SH NAME
sg_logs \- reads SCSI LOG SENSE pages
.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-ppc\fR]
[\fI-sp\fR] [\fI-V\fR] [\fI-?\fR] \fI<sg_device>\fR
.SH DESCRIPTION
.\" Add any additional description here
.PP
This command sends a LOG SENSE SCSI command to the given device and then
outputs the response. There is no facility to change log page data with 
this command.
.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 plave in command. Should be a number
between 0 and ffff inclusive. Requires PPC bit to be set to be active.
.TP
-ppc
sets the Parameter Pointer Control (PPC) bit. Default is 0 (i.e. cleared).
.TP
-sp
sets the Saving Parameters (SP) bit. Default is 0 (i.e. cleared).
.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 command.
.PP
In the 2.4 series of Linux kernels the given device must be
a SCSI generic (sg) device. In the 2.5 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.5 series kernels.
.SH AUTHOR
Written by Doug Gilbert
.SH "REPORTING BUGS"
Report bugs to <dgilbert@interlog.com>.
.SH COPYRIGHT
Copyright \(co 2002-2003 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 smartmontools(see net), sg_senddiag(sg3_utils)