aboutsummaryrefslogtreecommitdiff
path: root/doc/sg_logs.8
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2018-08-15 21:50:59 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2018-08-15 21:50:59 +0000
commit175f9fdb1a0851f958dc57488c5ecacd2f6811f4 (patch)
tree1dfc6bd3362f411364fd8993ddd0738c6f69e70e /doc/sg_logs.8
parenta059c857494382bb900dc23474b31c654017e461 (diff)
downloadsg3_utils-175f9fdb1a0851f958dc57488c5ecacd2f6811f4.tar.gz
turn off format checking for MinGW; more manpage clean-up
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@787 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'doc/sg_logs.8')
-rw-r--r--doc/sg_logs.866
1 files changed, 36 insertions, 30 deletions
diff --git a/doc/sg_logs.8 b/doc/sg_logs.8
index f5d2e774..af07a2a4 100644
--- a/doc/sg_logs.8
+++ b/doc/sg_logs.8
@@ -1,4 +1,4 @@
-.TH SG_LOGS "8" "May 2018" "sg3_utils\-1.43" SG3_UTILS
+.TH SG_LOGS "8" "August 2018" "sg3_utils\-1.43" SG3_UTILS
.SH NAME
sg_logs \- access log pages with SCSI LOG SENSE command
.SH SYNOPSIS
@@ -34,9 +34,12 @@ sg_logs \- access log pages with SCSI LOG SENSE command
.\" Add any additional description here
.PP
This utility sends a SCSI LOG SENSE command to the \fIDEVICE\fR and then
-outputs the response. The LOG SENSE command is used to fetch log pages. Known
-log pages can be decoded. Alternatively when the \fI\-\-reset\fR and/or
-\fI\-\-select\fR option is given then a SCSI LOG SELECT command is issued.
+outputs the response. The LOG SENSE command is used to fetch log pages which,
+if known, are decoded by default. When the \fI\-\-reset\fR and/or
+\fI\-\-select\fR option is given then a SCSI LOG SELECT command is issued
+to the \fIDEVICE\fR. Alternatively one or more log page responses can be in
+a file read using the \fI\-\-in=FN\fR option; in this case those responses
+are decoded and the \fIDEVICE\fR argument, if given, is ignored.
.PP
In SPC\-4 revision 5 a subpage code was introduced to both the LOG SENSE and
LOG SELECT command. At the same time a page code field was introduced to the
@@ -59,15 +62,16 @@ option name.
\fB\-A\fR, \fB\-\-All\fR
fetch and decode all the log pages and subpages supported by the \fIDEVICE\fR.
This requires a two stage process: first the "supported log pages and
-subpages" log page is fetched, then for each entry in the response, the
+subpages" log page is fetched, then for each entry in its response, the
corresponding log page (or subpage) is fetched and displayed. Note that there
are many SCSI devices that do not support LOG SENSE subpages and respond
-to this option with an illegal request sense key.
+to this option with an illegal request sense key (or ignored the subpage
+field).
.TP
\fB\-a\fR, \fB\-\-all\fR
outputs all the log pages supported by the \fIDEVICE\fR. This requires a two
stage process: first the "supported log pages" log page is fetched, then for
-each entry in the response, the corresponding log page is fetched and
+each entry in its response, the corresponding log page is fetched and
displayed. When used twice (e.g. '\-aa') all log pages and subpages are
fetched.
.TP
@@ -91,14 +95,14 @@ The default value is 1 (i.e. current cumulative values).
.TP
\fB\-e\fR, \fB\-\-enumerate\fR
this option is used to output information held in internal tables about
-known log pages including their names and acronyms. If given \fIDEVICE\fR
-is ignored. When given once (e.g. '\-e') all known pages are listed, sorted
-in ascending acronym order. When given twice, vendor pages are excluded.
-When given three times, all known pages are listed, sorted in ascending
-numeric order listed; when given four times, vendor pages are excluded from
-the numeric order.
+known log pages including their name, acronym and fields. If given, the
+\fIDEVICE\fR argument is ignored. When given once (e.g. '\-e') all known
+pages are listed, sorted in ascending acronym order (alphabetic). When
+given twice, vendor pages are excluded. When given three times, all known
+pages are listed, sorted in ascending numeric order listed; when given four
+times, vendor pages are excluded from the numeric order.
.br
-The \fI\-\-filter=FL\fR and \fI\-\-verbose\fR options modify the output
+The \fI\-\-filter=FL\fR and \fI\-\-verbose\fR options reduce the output
of the enumeration.
.TP
\fB\-f\fR, \fB\-\-filter\fR=\fIFL\fR
@@ -110,9 +114,9 @@ and only the parameter section matching that code is output. If the
\fB\-\-hex\fR option is given the log parameter is output in hexadecimal
rather than decoding it. If the \fB\-\-hex\fR option is used twice then the
leading address on each line of hex is removed. If the \fB\-\-raw\fR option
-is given then the log parameter is output in binary.
-Most log pages contain one or more log parameters. Examples of those that
-don't are those pages that list supported log pages.
+is given then the log parameter is output in binary. Most log pages contain
+one or more log parameters. Examples of those that don't follow that
+convention are those pages that list supported log pages (and subpages).
.br
In the \fI\-\-enumerate\fR case, when \fIFL\fR >= zero it is taken as a
pdt value and only log pages associated with that pdt plus generic pages
@@ -127,7 +131,7 @@ are enumerated.
print out the usage message then exit.
.TP
\fB\-H\fR, \fB\-\-hex\fR
-The default action is to decode known mode page numbers (and subpage numbers)
+The default action is to decode known log page numbers (and subpage numbers)
into text. When this option is used once, the response is output in
hexadecimal. When used twice, each line of hex has the ASCII equivalent shown
to the right. When used three times, the hex has no leading address nor
@@ -240,15 +244,16 @@ open on \fIDEVICE\fR and if it fails, this utility will exit. Note that
options like \fI\-\-select\fR most likely need a read\-write open.
.TP
\fB\-R\fR, \fB\-\-reset\fR
-use SCSI LOG SELECT command (PCR bit set) to reset the all log pages (or
-the given page). Exactly what is reset depends on the accompanying SP
-bit (i.e. \fI\-\-sp\fR option which defaults to 0) and the
+use SCSI LOG SELECT command (with the PCR bit set) to reset the all log
+pages (or the given page). Exactly what is reset depends on the accompanying
+SP bit (i.e. \fI\-\-sp\fR option which defaults to 0) and the
\fIPC\fR ("page control") value (which defaults to 1). Supplying this option
implies the \fI\-\-select\fR option as well. This option seems to clear error
counter log pages but leaves pages like self\-test results, start\-stop cycle
counter and temperature log pages unaffected. This option may be required to
clear log pages if a counter reaches its maximum value since the log page in
-which the counter is found will remain "stuck" until something is done.
+which the counter is found will remain "stuck" at its maximum value until
+some user interaction (e.g. calling sg_logs with this option).
.TP
\fB\-S\fR, \fB\-\-select\fR
use a LOG SELECT command. The default action (i.e. when neither this option
@@ -296,17 +301,18 @@ are followed by "[hex only]".
\fB\-V\fR, \fB\-\-version\fR
print out version string then exit.
.SH LOG SELECT
-The LOG SELECT command can be used to reset certain parameters to vendor
+The SCSI LOG SELECT command can be used to reset certain parameters to vendor
specific defaults, save them to non\-volatile storage (i.e. the media), or
supply new page contents. This command has changed between SPC\-3 and SPC\-4
with the addition of the Page and Subpage Code fields which can only be
non zero when the Parameter list length is zero.
.PP
-The \fI\-\-select\fR option is required to issue a LOG SELECT command. If
-the \fI\-\-in=FN\fR option is not given (or \fIFN\fR is effectively empty)
-then the Parameter list length field is set to zero. If the \fI\-\-in=FN\fR
-option is is given then its decoded data is placed in the data\-out buffer
-and its length in bytes is placed in the Parameter list length field.
+The \fI\-\-select\fR (or \fI\-\-reset\fR) option is required to issue a LOG
+SELECT command. If the \fI\-\-in=FN\fR option is not given (or \fIFN\fR is
+effectively empty) then the Parameter list length field is set to zero. If
+the \fI\-\-in=FN\fR option is is given then its decoded data is placed in
+the data\-out buffer and its length in bytes is placed in the Parameter list
+length field.
.PP
Other options that are active with the LOG SELECT command are
\fI\-\-control=PC\fR, \fI\-\-reset\fR (which sets the PCR bit) and
@@ -335,8 +341,8 @@ work in the standards. However some older devices don't comply. For
those devices using the \fI\-\-maxlen=LEN\fR option will do a single fetch.
A value of 252 should be a safe starting point.
.PP
-Various log pages hold information error rates, device temperature,
-start stop cycles since device produced and the results of the last
+Various log pages hold information error rates, device temperature, start
+stop cycles since the device was produced and the results of the last
20 self tests. Self tests can be initiated by the sg_senddiag(8) 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