aboutsummaryrefslogtreecommitdiff
path: root/sg_vpd.8
diff options
context:
space:
mode:
Diffstat (limited to 'sg_vpd.8')
-rw-r--r--sg_vpd.8115
1 files changed, 56 insertions, 59 deletions
diff --git a/sg_vpd.8 b/sg_vpd.8
index 451aaafd..1e0d6c51 100644
--- a/sg_vpd.8
+++ b/sg_vpd.8
@@ -1,81 +1,78 @@
-.TH SG_VPD "8" "October 2006" "sg3_utils-1.22" SG3_UTILS
+.TH SG_VPD "8" "January 2007" "sg3_utils\-1.23" SG3_UTILS
.SH NAME
-sg_vpd \- outputs information retrieved from a Vital Product Data (VPD)
-page held by a SCSI device
+sg_vpd \- fetches Vital Product Data (VPD) pages using a SCSI INQUIRY command
.SH SYNOPSIS
.B sg_vpd
-[\fI--enumerate\fR] [\fI--help\fR] [\fI--hex\fR] [\fI--ident\fR]
-[\fI--long\fR] [\fI--page=<vpd_page>\fR] [\fI--quiet\fR] [\fI--raw\fR]
-[\fI--verbose\fR] [\fI--version\fR] \fI<device>\fR
+[\fI\-\-enumerate\fR] [\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-ident\fR]
+[\fI\-\-long\fR] [\fI\-\-page=PG\fR] [\fI\-\-quiet\fR] [\fI\-\-raw\fR]
+[\fI\-\-verbose\fR] [\fI\-\-version\fR] \fIDEVICE\fR
.SH DESCRIPTION
.\" Add any additional description here
.PP
This utility fetches a Vital Product Data page and decodes it or
outputs it in ASCII hexadecimal or binary. VPD pages are fetched
-from SCSI devices by the INQUIRY command.
+with a SCSI INQUIRY command.
.PP
Probably the most important page is the Device Identification
-VPD page (page number: 0x83). Since SPC-3, support for this page
+VPD page (page number: 0x83). Since SPC\-3, support for this page
has been flagged as mandatory. This page can be fetched by
-using the '--ident' (or '-i') option.
+using the \fI\-\-ident\fR option.
.PP
-When no options are given, other than a '<device>', then the "Supported
+When no options are given, other than a \fIDEVICE\fR, then the "Supported
VPD pages" (0x0) VPD page is fetched and decoded.
+.SH OPTIONS
+Arguments to long options are mandatory for short options as well.
.TP
---enumerate | -e
-list the names of the known VPD pages, first the standard
-pages, then the vendor specific pages. Each group is sorted
-in abbreviation order. The '<device>' and other options
-are ignored and this utility exits after listing the VPD page
-names.
+\fB\-e\fR, \fB\-\-enumerate\fR
+list the names of the known VPD pages, first the standard pages, then the
+vendor specific pages. Each group is sorted in abbreviation order. The
+\fIDEVICE\fR and other options are ignored and this utility exits afte
+listing the VPD page names.
.TP
---help | -h
-outputs the usage message summarizing command line options
-then exits. Ignores <device> if given.
+\fB\-h\fR, \fB\-\-help\fR
+outputs the usage message summarizing command line options then exits.
+Ignores \fIDEVICE\fR if given.
.TP
---hex | -H
+\fB\-H\fR, \fB\-\-hex\fR
outputs the requested VPD page in ASCII hexadecimal. Can be used multiple
times, see section on the ATA information vpd page.
.TP
---ident | -i
-decode the device identification (0x83) VPD page. When used
-once this option has the same effect as '--page=di'.
-When use twice then the short form of the device identification
-VPD page's logical unit designator is decoded. In the latter
-case this option has the same effect as '--quiet --page=di_lu'.
+\fB\-i\fR, \fB\-\-ident\fR
+decode the device identification (0x83) VPD page. When used once this option
+has the same effect as '\-\-page=di'. When use twice then the short form o
+the device identification VPD page's logical unit designator is decoded. In
+the latter case this option has the same effect as '\-\-quiet \-\-page=di_lu'.
.TP
---long | -l
-when decoding some VPD pages, give a little more output.
-For example the ATA Information VPD page only shows the
-signature (in hex) and the IDENTIFY (PACKET) DEVICE (in hex)
-when this option is given.
+\fB\-l\fR, \fB\-\-long\fR
+when decoding some VPD pages, give a little more output. For example the ATA
+Information VPD page only shows the signature (in hex) and the IDENTIFY
+(PACKET) DEVICE (in hex) when this option is given.
.TP
---page=<vpd_page> | -p <vpd_page>
-specifies the VPD page to be decoded or output. The '<vpd_page>'
-argument can either be an abbreviation, a number or a pair or
-numbers separated by a comma. The VPD page abbreviations can be
-seen by using the '--list' option. If a number is given it is
-assumed to be decimal unless it has a hexadecimal indicator which
-is either a leading '0x' or a trailing 'h'. If one number is given
-then it is assumed to be a VPD page number. If two numbers are given
-the second number indicates which vendor specific VPD page to
-decode when several pages share the same VPD page number.
-If this option is not given (nor '-i', '-l' or '-V') then the "Supported
-VPD pages" (0x0) VPD page is fetched and decoded.
+\fB\-p\fR, \fB\-\-page\fR=\fIPG\fR
+where \fIPG\fR is the VPD page to be decoded or output. The \fIPG\fR argument
+can either be an abbreviation, a number or a pair or numbers separated by a
+comma. The VPD page abbreviations can be seen by using the \fI\-\-enumerate\fR
+option. If a number is given it is assumed to be decimal unless it has a
+hexadecimal indicator which is either a leading '0x' or a trailing 'h'. If
+one number is given then it is assumed to be a VPD page number. If two
+numbers are given the second number indicates which vendor specific VPD page
+to decode when several pages share the same VPD page number. If this option
+is not given (nor '\-i', '\-l' nor '\-V') then the "Supported VPD pages" (0x0)
+VPD page is fetched and decoded.
.TP
---quiet | -q
+\fB\-q\fR, \fB\-\-quiet\fR
suppress the amount of decoding output.
.TP
---raw | -r
+\fB\-r\fR, \fB\-\-raw\fR
output requested VPD page in binary. The output should be piped to a
file or another utility when this option is used. The binary is
sent to stdout, and errors are sent to stderr.
.TP
---verbose | -v
+\fB\-v\fR, \fB\-\-verbose\fR
increases the level or verbosity.
.TP
---version | -V
-print out version string
+\fB\-V\fR, \fB\-\-version\fR
+print out version string then exit.
.SH ATA INFORMATION VPD PAGE
This VPD page (0x89 or 'ai') is defined by the SCSI to ATA Translation
draft. It contains information about the SAT layer, the "signature" of
@@ -84,18 +81,18 @@ command. The latter part has 512 bytes of identity, capability and
settings data which the hdparm utility is capable of decoding (so this
utility doesn't decode it).
.PP
-To unclutter the output for this page, the signature and the
-IDENTIFY (PACKET) DEVICE response are not output unless the '--long'
-option (or '--hex' or '--raw') are given. When the '--long' option
-is given the IDENTIFY (PACKET) DEVICE response is output as
-256 (16 bit) words as is the fashion for ATA devices. To see that
-response as a string of bytes use the '-HH' option. To format the
-output suitable for hdparm to decode use either the '-HHH' or '-rr'
-option. For example if 'dev/sdb' is a SATA disk behind a SAT layer
-then this command: 'sg_vpd -p ai -HHH /dev/sdb | hdparm --Istdin'
+To unclutter the output for this page, the signature and the IDENTIFY (PACKET)
+DEVICE response are not output unless the \fI\-\-long\fR option (or
+\fI\-\-hex\fR or \fI\-\-raw\fR) are given. When the \fI\-\-long\fR option
+is given the IDENTIFY (PACKET) DEVICE response is output as 256 (16 bit)
+words as is the fashion for ATA devices. To see that response as a string of
+bytes use the '\-HH' option. To format the output suitable for hdparm to
+decode use either the '\-HHH' or '\-rr' option. For example if 'dev/sdb' is
+a SATA disk behind a SAT layer then this
+command: 'sg_vpd \-p ai \-HHH /dev/sdb | hdparm \-\-Istdin'
should decode the ATA IDENTIFY (PACKET) DEVICE response.
.SH NOTES
-In the 2.4 series of Linux kernels the given device must be
+In the 2.4 series of Linux kernels the \fIDEVICE\fR must be
a SCSI generic (sg) device. In the 2.6 series block devices (e.g. disks
and ATAPI DVDs) can also be specified. For example "sg_inq /dev/sda"
will work in the 2.6 series kernels. From lk 2.6.6 other SCSI "char"
@@ -108,7 +105,7 @@ Written by Doug Gilbert
.SH "REPORTING BUGS"
Report bugs to <dgilbert at interlog dot com>.
.SH COPYRIGHT
-Copyright \(co 2006 Douglas Gilbert
+Copyright \(co 2006\-2007 Douglas Gilbert
.br
This software is distributed under a FreeBSD license. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.