All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
To: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	James Bottomley <James.Bottomley@suse.de>,
	Ingo Molnar <mingo@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Frederic
Cc: Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Li Zefan <lizf@cn.fujitsu.com>,
	Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
	Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Subject: [PATCH 0/2 v4] scsi: ftrace based scsi tracer
Date: Thu, 01 Apr 2010 20:37:02 +0900	[thread overview]
Message-ID: <4BB4855E.7030509@jp.fujitsu.com> (raw)

Hi,

This is v4 patch series of SCSI trace.  Only a cosmetic change
from v3.

Because it's been a while since the first posting, I'll put brief
descriptions of the patchset.

  Basically, this is a ftrace based SCSI tracer.  It prints the
  following information for scsi-3 commands.

    o scsi bus number ("host")
    o scsi channel number ("channel")
    o scsi id ("id")
    o LUN ("lun")
    o command info
      - op name (ex. "WRITE_10")
      - LBA ("lba") (for certain commands only)
      - transfer length ("txlen") (for certain commands only)
      - CDB (ex. "raw=28 00 03 60 a2 cb 00 00 08 00")
    o result of the command
      (ex. "result=(driver=DRIVER_OK host=DID_OK
message=COMMAND_COMPLETE status=SAM_STAT_GOOD")

  Those information are printed either at a time:

    o when a command is to be dispatched,
    o when a command dispatched returns in error,
    o when a command is done,
    o when an error handler is to waken up, or
    o when timeout of a command is deteced.

  To use it quickly, try these steps:

    1) Build a kernel with the patchset applied
       (ftrace related kernel configs need to be enabled.)
    2) Boot the kernel
    3) Mount debugfs
       ex. mount -t debugfs none /sys/kernel/debug/
    4) Indicate events to trace
       ex. echo "scsi:*" > /sys/kernel/debug/tracing/set_event
    5) Make some I/Os on your scsi devices
       ex. ls
    6) Retrieve trace log
       ex. cat /sys/kernel/debug/tracing/trace

  Here is an outputs example:

    # tracer: nop
    #
    #           TASK-PID    CPU#    TIMESTAMP  FUNCTION
    #              | |       |          |         |
           flush-8:0-3746  [001]  1374.517152:
scsi_dispatch_cmd_start: host_no=0 channel=0 id=0 lun=0
cmnd=(WRITE_10 lba=32267539 txlen=8 raw=2a 00 01 ec 5d 13 00 00
08 00)
              <idle>-0     [000]  1374.524964:
scsi_dispatch_cmd_done: host_no=0 channel=0 id=0 lun=0
cmnd=(WRITE_10 lba=32267539 txlen=8 raw=2a 00 01 ec 5d 13 00 00
08 00) result=(driver=DRIVER_OK host=DID_OK
message=COMMAND_COMPLETE status=SAM_STAT_GOOD)

This patchset applies to 2.6.34-rc3.

Thanks,
Kei


WARNING: multiple messages have this Message-ID (diff)
From: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
To: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	James Bottomley <James.Bottomley@suse.de>,
	Ingo Molnar <mingo@redhat.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Li Zefan <lizf@cn.fujitsu.com>,
	Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
	Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Subject: [PATCH 0/2 v4] scsi: ftrace based scsi tracer
Date: Thu, 01 Apr 2010 20:37:02 +0900	[thread overview]
Message-ID: <4BB4855E.7030509@jp.fujitsu.com> (raw)

Hi,

This is v4 patch series of SCSI trace.  Only a cosmetic change
from v3.

Because it's been a while since the first posting, I'll put brief
descriptions of the patchset.

  Basically, this is a ftrace based SCSI tracer.  It prints the
  following information for scsi-3 commands.

    o scsi bus number ("host")
    o scsi channel number ("channel")
    o scsi id ("id")
    o LUN ("lun")
    o command info
      - op name (ex. "WRITE_10")
      - LBA ("lba") (for certain commands only)
      - transfer length ("txlen") (for certain commands only)
      - CDB (ex. "raw=28 00 03 60 a2 cb 00 00 08 00")
    o result of the command
      (ex. "result=(driver=DRIVER_OK host=DID_OK
message=COMMAND_COMPLETE status=SAM_STAT_GOOD")

  Those information are printed either at a time:

    o when a command is to be dispatched,
    o when a command dispatched returns in error,
    o when a command is done,
    o when an error handler is to waken up, or
    o when timeout of a command is deteced.

  To use it quickly, try these steps:

    1) Build a kernel with the patchset applied
       (ftrace related kernel configs need to be enabled.)
    2) Boot the kernel
    3) Mount debugfs
       ex. mount -t debugfs none /sys/kernel/debug/
    4) Indicate events to trace
       ex. echo "scsi:*" > /sys/kernel/debug/tracing/set_event
    5) Make some I/Os on your scsi devices
       ex. ls
    6) Retrieve trace log
       ex. cat /sys/kernel/debug/tracing/trace

  Here is an outputs example:

    # tracer: nop
    #
    #           TASK-PID    CPU#    TIMESTAMP  FUNCTION
    #              | |       |          |         |
           flush-8:0-3746  [001]  1374.517152:
scsi_dispatch_cmd_start: host_no=0 channel=0 id=0 lun=0
cmnd=(WRITE_10 lba=32267539 txlen=8 raw=2a 00 01 ec 5d 13 00 00
08 00)
              <idle>-0     [000]  1374.524964:
scsi_dispatch_cmd_done: host_no=0 channel=0 id=0 lun=0
cmnd=(WRITE_10 lba=32267539 txlen=8 raw=2a 00 01 ec 5d 13 00 00
08 00) result=(driver=DRIVER_OK host=DID_OK
message=COMMAND_COMPLETE status=SAM_STAT_GOOD)

This patchset applies to 2.6.34-rc3.

Thanks,
Kei


             reply	other threads:[~2010-04-01 11:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-01 11:37 Kei Tokunaga [this message]
2010-04-01 11:37 ` [PATCH 0/2 v4] scsi: ftrace based scsi tracer Kei Tokunaga
2010-04-01 11:40 ` [PATCH 1/2 v4] scsi: add __print_hex() to ftrace Kei Tokunaga
2010-04-01 11:40   ` Kei Tokunaga
2010-04-01 13:57   ` Steven Rostedt
2010-04-01 17:03     ` Joe Perches
2010-04-02  2:41       ` Li Zefan
2010-04-02  2:40     ` Li Zefan
2010-04-02  2:50       ` Steven Rostedt
2010-04-01 11:41 ` [PATCH 2/2 v4] scsi: add scsi trace core functions and put trace points Kei Tokunaga
2010-04-01 11:41   ` Kei Tokunaga

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=4BB4855E.7030509@jp.fujitsu.com \
    --to=tokunaga.keiich@jp.fujitsu.com \
    --cc=James.Bottomley@suse.de \
    --cc=kusumi.tomohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=xiaoguangrong@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.