From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: 谢纲 <xiegang112@gmail.com>
Cc: Jonathan Nell <crtrn13@gmail.com>, linux-scsi@vger.kernel.org
Subject: Re: scsi traffic sniffing
Date: Tue, 01 Sep 2009 13:19:44 +0200 [thread overview]
Message-ID: <4A9D0350.2010201@s5r6.in-berlin.de> (raw)
In-Reply-To: <d364733c0909010340t57499a38y4c0bd949e5ba63a6@mail.gmail.com>
谢纲 wrote:
> On Tue, Sep 1, 2009 at 2:13 PM, Jonathan Nell<crtrn13@gmail.com> 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 drive
> You 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_level
provided 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2009-09-01 11:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <48e952f40908312312w7765c2a1q3a4f022967735288@mail.gmail.com>
[not found] ` <48e952f40908312313u75e4d00cr3d934f1dbdd1cca9@mail.gmail.com>
2009-09-01 6:13 ` scsi traffic sniffing Jonathan Nell
2009-09-01 10:40 ` 谢纲
2009-09-01 11:19 ` Stefan Richter [this message]
2009-09-02 3:12 ` 谢纲
2009-09-02 4:20 ` Jonathan Nell
2009-09-02 4:49 ` 谢纲
2009-09-02 6:48 ` Jonathan Nell
2009-09-02 7:21 ` Xie Gang
2009-09-02 7:50 ` Jonathan Nell
2009-09-02 8:03 ` Xie Gang
2009-09-02 12:05 ` Jonathan Nell
2009-09-01 16:06 ` Grant Grundler
[not found] ` <48e952f40909010917n7590d364sc4a16317d5e7fb0a@mail.gmail.com>
2009-09-01 16:48 ` Grant Grundler
2009-09-01 16:57 ` Ric Wheeler
2009-09-01 17:13 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A9D0350.2010201@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=crtrn13@gmail.com \
--cc=linux-scsi@vger.kernel.org \
--cc=xiegang112@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox