public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: systemtap@sources.redhat.com
Subject: Re: simple (dumb) script to track sizes of IOs
Date: Thu, 06 Oct 2005 17:27:00 -0000	[thread overview]
Message-ID: <y0m8xx6a74o.fsf@tooth.toronto.redhat.com> (raw)
In-Reply-To: <1128617293.4754.101.camel@dyn9047017102.beaverton.ibm.com>


pbadari wrote:

> Here is a simple systemtap script to track the sizes of IOs 
> that are getting generated (to the driver).

That's block i/o only right?

> [...]
> Is there a way, I can print in the order of IO sizes easily ?

There will be a way of iterating in a sorted order, probably
expressed syntactically like this:

# function report () {
#   foreach (ascending(io) in iosizes) {
#         if (iosizes[io]) # ...
# }

> [...]# stap -g iosizes.stp [...]

Your script does not need guru mode.  Merely reading $rq->nr_sectors
is fine without that.  You also don't need to check "if (iosizes[io])"
since zero-valued array elements do not appear in foreach()
iterations.

- FChE

  reply	other threads:[~2005-10-06 17:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-06 16:48 Badari Pulavarty
2005-10-06 17:27 ` Frank Ch. Eigler [this message]
2005-10-06 17:37   ` Badari Pulavarty
2005-10-06 17:44     ` Frank Ch. Eigler
2005-10-07 19:17     ` Frank Ch. Eigler
2005-10-07 21:19       ` Badari Pulavarty
2005-10-07 22:02         ` Frank Ch. Eigler
2005-10-07 22:42           ` Daniel P. Berrange
2005-10-08  1:54 Zhang, Yanmin
2005-10-08 16:45 Frank Ch. Eigler
2005-10-09  0:33 Zhang, Yanmin

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=y0m8xx6a74o.fsf@tooth.toronto.redhat.com \
    --to=fche@redhat.com \
    --cc=pbadari@us.ibm.com \
    --cc=systemtap@sources.redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).