1SG_VPD(8)                          SG3_UTILS                         SG_VPD(8)
2
3
4

NAME

6       sg_vpd  -  fetches  Vital Product Data (VPD) pages using a SCSI INQUIRY
7       command
8

SYNOPSIS

10       sg_vpd [--enumerate] [--help] [--hex]  [--ident]  [--long]  [--page=PG]
11       [--quiet] [--raw] [--verbose] [--version] DEVICE
12

DESCRIPTION

14       This  utility  fetches a Vital Product Data page and decodes it or out‐
15       puts it in ASCII hexadecimal or binary. VPD pages are  fetched  with  a
16       SCSI INQUIRY command.
17
18       Probably  the most important page is the Device Identification VPD page
19       (page number: 0x83). Since  SPC-3,  support  for  this  page  has  been
20       flagged  as  mandatory.  This  page can be fetched by using the --ident
21       option.
22
23       When no options are given, other than a DEVICE, then the "Supported VPD
24       pages" (0x0) VPD page is fetched and decoded.
25

OPTIONS

27       Arguments to long options are mandatory for short options as well.
28
29       -e, --enumerate
30              list the names of the known VPD pages, first the standard pages,
31              then the vendor specific pages. Each group is sorted in abbrevi‐
32              ation  order.  The DEVICE and other options are ignored and this
33              utility exits afte listing the VPD page names.
34
35       -h, --help
36              outputs the usage message summarizing command line options  then
37              exits.  Ignores DEVICE if given.
38
39       -H, --hex
40              outputs the requested VPD page in ASCII hexadecimal. Can be used
41              multiple times, see section on the ATA information vpd page.
42
43       -i, --ident
44              decode the device identification (0x83) VPD page. When used once
45              this  option  has the same effect as '--page=di'. When use twice
46              then the short form o the device identification VPD page's logi‐
47              cal  unit  designator is decoded. In the latter case this option
48              has the same effect as '--quiet --page=di_lu'.
49
50       -l, --long
51              when decoding some VPD pages, give a  little  more  output.  For
52              example  the  ATA  Information VPD page only shows the signature
53              (in hex) and the IDENTIFY (PACKET) DEVICE  (in  hex)  when  this
54              option is given.
55
56       -p, --page=PG
57              where  PG  is the VPD page to be decoded or output. The PG argu‐
58              ment can either be an abbreviation, a number or a pair  or  num‐
59              bers  separated  by  a  comma. The VPD page abbreviations can be
60              seen by using the --enumerate option. If a number is given it is
61              assumed  to  be  decimal  unless  it has a hexadecimal indicator
62              which is either a leading '0x' or a trailing 'h'. If one  number
63              is given then it is assumed to be a VPD page number. If two num‐
64              bers are given the second number indicates which vendor specific
65              VPD  page  to  decode when several pages share the same VPD page
66              number. If this option is not given (nor '-i',  '-l'  nor  '-V')
67              then  the  "Supported  VPD  pages" (0x0) VPD page is fetched and
68              decoded.
69
70       -q, --quiet
71              suppress the amount of decoding output.
72
73       -r, --raw
74              output requested VPD page in binary. The output should be  piped
75              to  a  file  or  another  utility  when this option is used. The
76              binary is sent to stdout, and errors are sent to stderr.
77
78       -v, --verbose
79              increases the level or verbosity.
80
81       -V, --version
82              print out version string then exit.
83

ATA INFORMATION VPD PAGE

85       This VPD page (0x89 or 'ai') is defined by the SCSI to ATA  Translation
86       draft.  It contains information about the SAT layer, the "signature" of
87       the ATA device and the response to the  ATA  IDENTIFY  (PACKET)  DEVICE
88       command. The latter part has 512 bytes of identity, capability and set‐
89       tings data which the hdparm utility is capable  of  decoding  (so  this
90       utility doesn't decode it).
91
92       To  unclutter  the output for this page, the signature and the IDENTIFY
93       (PACKET) DEVICE response are not output unless the  --long  option  (or
94       --hex or --raw) are given. When the --long option is given the IDENTIFY
95       (PACKET) DEVICE response is output as 256 (16  bit)  words  as  is  the
96       fashion  for ATA devices. To see that response as a string of bytes use
97       the '-HH' option. To format the output suitable for  hdparm  to  decode
98       use  either  the  '-HHH' or '-rr' option. For example if 'dev/sdb' is a
99       SATA disk behind a SAT layer then this  command:  'sg_vpd  -p  ai  -HHH
100       /dev/sdb  |  hdparm  --Istdin'  should decode the ATA IDENTIFY (PACKET)
101       DEVICE response.
102

NOTES

104       In the 2.4 series of Linux kernels the DEVICE must be  a  SCSI  generic
105       (sg)  device.  In  the  2.6  series block devices (e.g. disks and ATAPI
106       DVDs) can also be specified. For example "sg_inq /dev/sda" will work in
107       the  2.6  series  kernels. From lk 2.6.6 other SCSI "char" device names
108       may be used as well (e.g. "/dev/st0m").
109

EXIT STATUS

111       The exit status of sg_vpd is 0 when it is successful. Otherwise see the
112       sg3_utils(8) man page.
113

AUTHOR

115       Written by Doug Gilbert
116

REPORTING BUGS

118       Report bugs to <dgilbert at interlog dot com>.
119
121       Copyright © 2006-2007 Douglas Gilbert
122       This  software is distributed under a FreeBSD license. There is NO war‐
123       ranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR  PUR‐
124       POSE.
125

SEE ALSO

127       sg_inq(sg3_utils), sdparm(sdparm), hdparm(hdparm)
128
129
130
131sg3_utils-1.23                   January 2007                        SG_VPD(8)
Impressum