sginfo is an utility that access mode page information for a SCSI (or ATAPI) devicesg, it's a port of the linux scsiinfo program, uses SCSI generic devices.

This  utility  is  in  legacy  mode, only obvious bugs will be fixed. Options like -l (to list devices) are broken in recent versions of Linux (e.g. 2.6 series and later); the lsscsi utility can be used instead. Also mode pages are not being updated as http://www.t10.org adds and modifies mode page fields. Those interested in SCSI mode  pages  may  find  the  sdparm  utility more up to date and easier use, especially for changing parameters.

sg3_utils is a collection of Linux utilities for devices that use the SCSI command set. You can install by typing following command:

# yum install sg3_utils

sginfo command examples

'-M' option Access manufacturer defaults instead of current values

'-m' option Access modifiable fields instead of current values

# sginfo -M /dev/sda
INQUIRY response (cmd: 0x12)
----------------------------
Device Type                        0
Vendor:                    ATA     
Product:                   SEAGATE ST31000N
Revision level:            SU0E

'-i' option, Display information from INQUIRY command

# sginfo -i /dev/sda
INQUIRY response (cmd: 0x12)
----------------------------
Device Type                        0
...
Command Queueing                   1
Vendor:                    ATA     
Product:                   SEAGATE ST31000N
Revision level:            SU0E

'-s' option, Display serial number (from INQUIRY VPD page)

# sginfo -s /dev/sda
Serial Number '9QJ53A27

'-a' option, Display inquiry info, serial # and all mode pages

# sginfo -a /dev/sda
INQUIRY response (cmd: 0x12)
----------------------------
Device Type                        0
Vendor:                    ATA     
Product:                   SEAGATE ST31000N
Revision level:            SU0E

Serial Number '9QJ53A27            '
...

'-e' option, Access Read-Write Error Recovery page.

# sginfo -e /dev/sda
Read-Write Error Recovery mode page (0x1)
-----------------------------------------
AWRE                               1
ARRE                               0
TB                                 0
RC                                 0
EER                                0
PER                                0
DTE                                0
DCR                                0
Read Retry Count                   0
Correction Span                    0
Head Offset Count                  0
Data Strobe Offset Count           0
Write Retry Count                  0
Recovery Time Limit (ms)           0

'-f' option, Access Format Device Page.

# sginfo -f /dev/sda
Format Device mode page (0x3)
-----------------------------
Tracks per Zone                    128
Alternate sectors per zone         0
Alternate tracks per zone          0
Alternate tracks per lu            0
Sectors per track                  128
Data bytes per physical sector     512
Interleave                         0
Track skew factor                  1
Cylinder skew factor               0
Supports Soft Sectoring            0
Supports Hard Sectoring            1
Removable Medium                   0
Surface                           

'-d' option, Display defect lists (default format: index)

# sginfo -d /dev/sda
INQUIRY response (cmd: 0x12)
----------------------------
Device Type                        0
Vendor:                    ATA     
Product:                   SEAGATE ST31000N
Revision level:            SU0E

>>> Unable to read primary (PLIST) defect data.
>>> Unable to read grown (GLIST) defect data.

'-c' option, Access Caching Page.

# sginfo -c /dev/sda
Caching mode page (0x8)
-----------------------
Initiator Control                  0
ABPF                               0
CAP                                0
DISC                               0
SIZE                               0
Write Cache Enabled                1
MF                                 0
Read Cache Disabled                0
Demand Read Retention Priority     0
Demand Write Retention Priority    0
Disable Pre-fetch Transfer Length  0
Minimum Pre-fetch                  0
Maximum Pre-fetch                  0
Maximum Pre-fetch Ceiling          0
FSW                                0
LBCSS                              0
DRA                                0
NV_DIS                             0
Number of Cache Segments           0
Cache Segment size                 0
Non-Cache Segment size             0

'-l' option, List known scsi devices on the system [DEPRECATED], run lsscsi instead

# sginfo -l /dev/sda

/dev/sg0 [scsi0 ch=0 id=0 lun=0]
/dev/sg1 [scsi0 ch=0 id=1 lun=0]
/dev/sg2 [scsi0 ch=0 id=2 lun=0]
/dev/sg3 [scsi0 ch=0 id=3 lun=0]
/dev/sg4 [scsi0 ch=0 id=4 lun=0]
/dev/sg5 [scsi0 ch=0 id=5 lun=0]
...

'-r' option, list known raw scsi devices on the system