This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New example script: nfstop


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/23/2012 02:56 PM, David Smith wrote:
> Back at FUDCon, during the systemtap info session I helped an
> attendee with a script.  He had been using a dtrace script, called
> nfstop, from the following link:
> 
> <http://blogs.oracle.com/erickustarz/entry/dscript_to_retrieve_active_nfs>
>
>  I made a quick approximation of the script at the conference, but
> hadn't had time to get back to it and spiffy it up a bit.
> 
> I took some time yesterday and finally made some changes.  The
> script acts a bit like 'top', listing the NFS clients who made the
> most NFS operations every 5 seconds.  Current versions of systemtap
> should have IPv4 and IPv6 client support.
> 
> I'll be incorporating this into the systemtap examples.
> 
> Any feedback on the script would be appreciated.
> 

Funnily enough I hacked something similar together last year. It's
been on my TODO since then to clean it up a bit and use it for a Red
Hat article.

I started working on a version using aggregates but that got ugly fast
(as it needed to handle empty and non-empty aggregates explicitly at
the time).

I think I talked to Frank at the time about ways to make this cleaner
(iirc all the @ops were wrapped in if(have_xxx_stats) constructs) but
I haven't been back to look again since.

Here's my original version. It just tracks lookups, reads and writes
and maintains global and per-client byte counters. It's been
successfully used in production at a few sites (iirc on RHEL5) for
tracking down badly behaved NFS clients and observing general server
performance.

I should probably dust off the improved version and see if I can
de-ugly it a bit.

Regards,
Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9skykACgkQ6YSQoMYUY96p0wCg26CFCTh6slLkFnlFRDG1ZP3X
gSoAnjvcmf3G9mfcTGwkiy9W5OPcRNXM
=NWpF
-----END PGP SIGNATURE-----

Attachment: nfsdtop.stp
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]