views:

752

answers:

4

I've recently began using dTrace and have noticed just how awesome it is. Its the perfect tool for profiling without placing the burden on programmers to set up hundreds of probes in their applications.

I've found some nice one liner and sample scripts here and there, but I was wondering about what scripts, tools and links others might want to share.

BTW Anybody tried Chimes?

+4  A: 

Here are some links I've found useful

A Powerpoint presentation about dTrace:

http://www.nbl.fi/~nbl97/solaris/dtrace/dtt_present.pdf

200+ useful scripts:

http://www.brendangregg.com/

Robert Gould
+2  A: 

It's worth noting that because of the differences in Apple's and Sun's implementations, dtrace scripts from Solaris may not (likely won't) work on Leopard, and vice-versa. I'm not sure about FreeBSD's version.

The main problem is a different set of probes made available by the OS. Sometimes the probes will be provided under a different name. Sometimes they'll be more or less specific from one OS to another. Just a gotcha in case you come across a script that, for some reason, won't work.

Dan Udey
+3  A: 

I attended Theo Schlossnagle's Full Stack Introspection Crash Course talk at OSCON this year. In that presentation he gives several examples of using the D-Trace language and at the above link there are some additional utilities.

Kyle Burton
A: 

Unfortunately dTrace is only implemented in/for Solaris OS. People from sun are recommend me to port all my php applications to Solaris, and "dtrace" them. After optimizing to again port them on my previous OS.

vaske
And MacOS, and some flavors of BSD.Linux and Windows don't however support dTrace (Windows is just too different, and Linux is to proud if nothing else, because they could support it)
Robert Gould