From: Jake Maul <jakemaul@gmail.com>
To: William Cohen <wcohen@redhat.com>
Cc: systemtap@sourceware.org
Subject: Re: Linux VFS cache hit rate script
Date: Wed, 20 Apr 2011 20:46:00 -0000 [thread overview]
Message-ID: <BANLkTinFrm5S8wxEbDobtqzPBAOb-PjsYg@mail.gmail.com> (raw)
In-Reply-To: <4DAF3D59.7020609@redhat.com>
On Wed, Apr 20, 2011 at 1:08 PM, William Cohen <wcohen@redhat.com> wrote:
> On 04/20/2011 03:04 PM, Jake Maul wrote:
>> Greetings all,
>
> Hi Jake,
>
> Thanks for taking the time to submit the example.
>
>>
>> I have recently put a script up on the War Stories page, and it was
>> requested of me to also post it to the list, along with a .meta file.
>> They're both attached.
>>
>> http://sourceware.org/systemtap/wiki/WSCacheHitRate
>
> Why the need for -DMAXMAPENTRIES=100000 on the second example on the wiki page? There doesn't seem to be any arrays in the script.
For some reason on that particular server, I get this error sometimes:
ERROR: Array overflow, check MAXMAPENTRIES near identifier '$file' at
/usr/share/systemtap/tapset/vfs.stp:769:9
I freely admit, that was voodoo-administration on my part- I found
something somewhere that indicated you can make that variable larger
like that, and tried it out. It seems to help, but I haven't the
slightest idea why. If anyone can shed some light on that, I'd be much
obliged. :)
On a different server, it works fine without that. They're both RHEL5,
but the working on is 64-bit and the one that sometimes errors is
32-bit PAE. Not sure if that matters. They do have completely
different datasets and workloads.
>> Let me know what you think! It's my first SystemTap script, so I'm
>> sure there are improvements that could be made. I'm by no means a
>> kernel hacker, or even a C dev... just a lowly sysadmin. :)
>
> Include a short header like the following at the beginning of the script:
>
> #!/usr/bin/env stap
> # cache-hit.stp
> # Copyright (C) 2011 xxx <xxx@yyy.zzz>
> #
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License version 2 as
> # published by the Free Software Foundation.
Good call, I'll add something.
> Should avoid long line lengths in the printf statements. Wrapped lines don't look good in manuals.
Also good.
> The following line sounds unsure, need to check that that is really the case:
>
> if (devname=="N/A") { /* N/A means cache hit... right? */
>
> It would be good to have a better explanation for the "N/A" check.
This is from the beginner's guide, actually:
http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/SystemTap_Beginners_Guide/mainsect-disk.html
It bothers me too, because I can't find any documentation that says
explicitly when you would get an 'N/A' devname. I don't know if it's a
SystemTap thing or a kernel thing, but being that I don't have
experience working on either, I'm fairly lost.
Thanks for the feedback!
Jake
next prev parent reply other threads:[~2011-04-20 20:46 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-20 19:04 Jake Maul
2011-04-20 20:09 ` William Cohen
2011-04-20 20:46 ` Jake Maul [this message]
2011-04-20 20:57 ` Josh Stone
2011-04-20 22:25 ` Jake Maul
2011-04-21 20:17 ` Jake Maul
2011-04-21 22:31 ` William Cohen
2011-04-21 23:02 ` Jake Maul
2011-04-21 23:46 ` Josh Stone
2011-04-22 19:17 ` Jake Maul
2011-04-22 20:28 ` Josh Stone
2011-04-22 21:47 ` Jake Maul
2011-04-25 21:54 ` Josh Stone
2011-04-26 2:11 ` Jake Maul
2011-04-25 22:53 ` Josh Stone
2011-04-26 1:59 ` Jake Maul
2011-04-26 2:44 ` Josh Stone
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=BANLkTinFrm5S8wxEbDobtqzPBAOb-PjsYg@mail.gmail.com \
--to=jakemaul@gmail.com \
--cc=systemtap@sourceware.org \
--cc=wcohen@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).