NAME
sg_logs - reads SCSI LOG SENSE pages
SYNOPSIS
sg_logs
[
-a] [
-c=<page_control>] [
-h] [
-l]
[
-p=<page_code>] [
-paramp=<parameter_pointer>] [
-pcb]
[
-ppc] [
-sp] [
-t] [
-V] [
-?]
<sg_device>
DESCRIPTION
This utility 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 utility.
- -a
-
outputs all the log pages supported by the device.
- -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).
- -h
-
suppresses decoding of known log sense pages and prints out the
response in hex instead.
- -l
-
lists the names of all logs sense pages supported by this device.
- -p=<page_code>
-
log page code to fetch. Should be a hexadecimal number between 0 and 3f
inclusive.
- -paramp=<parameter_pointer>
-
parameter pointer value (in hex) to place in command. Should be a number
between 0 and ffff inclusive.
- -pcb
-
show Parameter Control Byte settings (only relevant when log parameters
being output in ASCII).
- -ppc
-
sets the Parameter Pointer Control (PPC) bit. Default is 0 (i.e. cleared).
- -sp
-
sets the Saving Parameters (SP) bit. Default is 0 (i.e. cleared).
- -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).
- -V
-
print out version string
- -?
-
output usage message. Ignore all other parameters.
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.
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.
AUTHOR
Written by Doug Gilbert
REPORTING BUGS
Report bugs to <
dgilbert@interlog.com>.
COPYRIGHT
Copyright © 2002-2003 Douglas Gilbert
This software is distributed under the GPL version 2. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
SEE ALSO
smartmontools(see net), sg_senddiag(sg3_utils)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- AUTHOR
-
- REPORTING BUGS
-
- COPYRIGHT
-
- SEE ALSO
-