SG_VPD - Online Linux Manual PageSection : 8
Updated : February 2008
Source : sg3_utils−1.26
Note : SG3_UTILS

NAMEsg_vpd − fetches Vital Product Data (VPD) pages using a SCSI INQUIRY command

SYNOPSISsg_vpd [−−enumerate] [−−help] [−−hex] [−−ident] [−−long] [−−maxlen=LEN] [−−page=PG] [−−quiet] [−−raw] [−−verbose] [−−version] DEVICE

DESCRIPTION This utility fetches a Vital Product Data page and decodes it or outputs it in ASCII hexadecimal or binary. VPD pages are fetched with a SCSI INQUIRY command. Probably the most important page is the Device Identification 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 option. When no options are given, other than a DEVICE, then the "Supported VPD pages" (0x0) VPD page is fetched and decoded.

OPTIONSArguments to long options are mandatory for short options as well. The options are arranged in alphabetical order based on the long option name. −e, −−enumerate  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 afte listing the VPD page names. −h, −−help  outputs the usage message summarizing command line options then exits. Ignores DEVICE if given. −H, −−hex  outputs the requested VPD page in ASCII hexadecimal. Can be used multiple times, see section on the ATA information vpd page. −i, −−ident  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'. −l, −−long  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. −m, −−maxlen=LEN  where LEN is the (maximum) response length in bytes. It is placed in the cdb's "allocation length" field. If not given (or LEN is zero) then 252 is used (apart from the ATA Information VPD page which defaults to 572) and, if the response indicates this value is insufficient, another INQUIRY command is sent with a larger value in the cdb's "allocation length" field. If this option is given and LEN is greater than 0 then only one INQUIRY command is sent. Since many simple devices implement the INQUIRY command badly (and do not support VPD pages) then the safest value to use for LEN is 36. See the sg_inq man page for the more information. −p, −−page=PG  where PG is the VPD page to be decoded or output. The PG 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 −−enumerate 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. −q, −−quiet  suppress the amount of decoding output. −r, −−raw  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. −v, −−verbose  increases the level or verbosity. −V, −−version  print out version string then exit.

ATA INFORMATION VPD PAGEThis VPD page (0x89 or 'ai') is defined by the SCSI to ATA Translation standard. It contains information about the SAT layer, the "signature" of the ATA device and the response to the ATA IDENTIFY (PACKET) DEVICE 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). 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' should decode the ATA IDENTIFY (PACKET) DEVICE response.

NOTESIn the 2.4 series of Linux kernels the DEVICE 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" device names may be used as well (e.g. "/dev/st0m").

EXIT STATUSThe exit status of sg_vpd is 0 when it is successful. Otherwise see the sg3_utils(8) man page.

AUTHORWritten by Doug Gilbert

REPORTING BUGSReport bugs to <dgilbert at interlog dot com>.

COPYRIGHTCopyright © 2006−2008 Douglas Gilbert
This software is distributed under a FreeBSD license. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSOsg_inq(sg3_utils), sdparm(sdparm), hdparm(hdparm)
0
Johanes Gumabo
Data Size   :   18,813 byte
man-sg_vpd.8Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 239,570
Visitor ID   :     :  
Visitor IP   :   3.146.255.135   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.