SCSI Sense Data

SCSI Sense Data is the information that comes back from a target when either 1) a CHECK CONDITION Status has been received at the end of a Command (using an auto-sense mechanism), or 2) a REQUEST SENSE command has been issue by a SCSI Initiator.

Whenever I do my SAN training classes, this is one of the topics that I always cover – How to Decode SCSI Sense Data.  Becoming a sense data decoder is not that difficult if you know the basic structure of the sense data and the 4 basic steps that I used to decode 95% (or more) of all the sense data that I see.  Below are the basic steps.

Step 1 – Check the Sense Key.  The Sense Key provides “basic” information about the error and is located in byte 2, bits 3-0, of the returned sense data.

Step 2 – Check the Additional Length field.  This field is located in byte 7 and tells you how many more bytes of data are valid (after byte 7).

Step 3 – Check the Additional Sense Code (ASC) and Additional Sense Code Qualifier (ASCQ).  These are bytes 12 & 13 of the returned sense data and provide more detailed information about the failure or error condition.

Step 4 – Check the Sense Key Specific Valid (SKSV) bit, which is located in bit 7 of byte 15.  If that bit is on, it means that there is “even more” detail about the condition that caused the problem in bytes 15-17.  You will have to plug it into another decode table, based on the Sense Key (from Step 1), but in some cases, this can point you to the exact bit and byte in error so that you can debug your problem.

Sense Data Decoder Steps

Steps to Decode SCSI Sense Data

These 4 basic steps can decode up to 95% of all the SCSI error conditions that you will ever see, but there can be even more details, depending on the SCSI device (disk drive, tape drive, etc.) that you are working with.  Master these 4 steps and practice them whenever you can and you will become a SCSI Sense Data Decoder in a relatively short period of time.  If you want to learn how to decode sense data even faster, just let me know and we can get you signed up.

Incoming search terms for the article: