Last active
April 21, 2018 20:12
-
-
Save baruch/0115922b7571d9f0e6ad2133f45ad648 to your computer and use it in GitHub Desktop.
Get SCSI Sense buffers in Linux with systemtap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| probe module("scsi_mod").function("scsi_command_normalize_sense") { | |
| printf("CDB:"); | |
| for (i = 0; i < $cmd->cmd_len; i++) { | |
| printf(" %02X", $cmd->cmnd[i]); | |
| } | |
| printf(" | SENSE:"); | |
| for (i = 0; i < 32; i++) { | |
| printf(" %02X", $cmd->sense_buffer[i]); | |
| } | |
| printf("\n"); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Decoding SCSI sense buffers is easy with http://scsi.ev-en.org/