Re: scsi traffic sniffing
|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
On Tue, Sep 1, 2009 at 2:13 PM, Jonathan Nell<crtrn13@xxxxxxxxx> wrote:Is there any way to sniff the traffic of a scsi device? I need to debug a firmware update and need to see the traffic being passed to the driveYou may hook the queue_command function of the scsi host. It can sniff all scsi request to scsi host driver.
Actually you can switch on logging of commands and status (though not of data) at runtime by something like
# echo $BITMASK > /sys/module/scsi_mod/parameters/scsi_logging_level or # echo $BITMASK > /proc/sys/dev/scsi/logging_levelprovided that the kernel's SCSI core was compiled with CONFIG_SCSI_LOGGING=y.
Bitmask values can be constructed as in linux/drivers/scsi/scsi_logging.h. Long ago I made a note that 9216 as bitmask was useful for my purposes, but don't ask me what that means.
For data logging, you have to modify the SCSI low-level driver or SCSI core indeed.
However, all this applies only if the firmware updater actually runs on a Linux initiator, not e.g. on an MS Windows initiator. In the latter case, you need a debug driver which hooks into Windows' SCSI stack, or some sort of bus analyzer.
-- Stefan Richter -=====-==--= =--= ----= http://arcgraph.de/sr/ -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html