sg_inq --version (return code: 0)
Version string: 1.57 20160208
sg_inq --help (return code: 0)
Usage: sg_inq [--ata] [--block=0|1] [--cmddt] [--descriptors] [--export]
[--extended] [--help] [--hex] [--id] [--inhex=FN] [--len=LEN]
[--maxlen=LEN] [--page=PG] [--raw] [--vendor] [--verbose]
[--version] [--vpd] DEVICE
where:
--ata|-a treat DEVICE as (directly attached) ATA device
--block=0|1 0-> open(non-blocking); 1-> open(blocking)
-B 0|1 (def: depends on OS; Linux pt: 0)
--cmddt|-c command support data mode (set opcode with '--page=PG')
use twice for list of supported commands; obsolete
--descriptors|-d fetch and decode version descriptors
--export|-u SCSI_IDENT_<assoc>_<type>=<ident> output format.
Defaults to device id page (0x83) if --page not given,
only supported for VPD pages 0x80 and 0x83
--extended|-E|-x decode extended INQUIRY data VPD page (0x86)
--help|-h print usage message then exit
--hex|-H output response in hex
--id|-i decode device identification VPD page (0x83)
--inhex=FN|-I FN read ASCII hex from file FN instead of DEVICE;
if used with --raw then read binary from FN
--len=LEN|-l LEN requested response length (def: 0 -> fetch 36
bytes first, then fetch again as indicated)
--maxlen=LEN|-m LEN same as '--len='
--page=PG|-p PG Vital Product Data (VPD) page number or
abbreviation (opcode number if '--cmddt' given)
--raw|-r output response in binary (to stdout)
--vendor|-s show vendor specific fields in std inquiry
--verbose|-v increase verbosity
--version|-V print version string then exit
--vpd|-e vital product data (set page with '--page=PG')
Performs a SCSI INQUIRY command on DEVICE or decodes INQUIRY response
held in file FN. If no options given then does a 'standard' INQUIRY.
Can list VPD pages with '--vpd' or '--page=PG' option. sg_vpd and
sdparm decode more VPD pages than this utility.