Wednesday, June 16, 2010

Looking for a simple introduction to DTrace

DTrace, if you didn't already know, is the kernel instrumentation package that (I think) originally was built for Sun Solaris, then has more recently been adopted by FreeBSD and possibly other operating systems.

I was trying to understand some NFS behaviors on a Solaris system, and I was thinking that maybe DTrace would help me, so I went looking around the net for simple introductory material such as "dummies guide to DTrace" or "DTrace for old dinosaur programmers like Bryan", but I failed to find anything helpful in my several hours of hunting and poking.

I found lots of references to the DTrace Toolkit.

And I found several massive books I could read.

But I didn't quite find the simple easy-to-approach guide that I was hoping for.

Any pointers to good basic material to help an old man like me get going with DTrace?

Meanwhile, I figured out that between 'truss' and 'snoop -v', I could get a fairly complete picture of what my NFS requests were doing, so for the time being it's not an emergency, but it's still one of those "things I wish I knew about and had in my toolkit", so I'll try to return to it at some point.

1 comment:

  1. There's quite a few ways to get started with dtrace amd I think you've already got hold of one of the better ones with the Dtrace toolkit. Much can be learned from that, but keep the dtrace guide from handy for details. Brendan who wrote the toolkit also has a dtrace cheat sheet and a handful of one-liners that can be useful.
    For nfs tracing in particular, (page 4+5 mostly) is the place to look. No simple examples unfortunately, but a very good overview.

    /Mads -