Log in

No account? Create an account

Tue, May. 8th, 2012, 08:04 pm
Dtrace on Ubuntu 12.04 64-bit

So my boss recently recommended that I watch Bryan Cantrill's talk on Dtrace. Unfortunately it wasn't until the end of video, after I'd been thoroughly seduced by dreams of widely usable production-safe software testing, that the other shoe dropped: this toy is for Solaris and BSD, and with a license (CDDL) that appears designed to make it difficult to include in the GPL ecosystem.

Thankfully, I'm not the only one to say "fuck that with a largish cactus". Since the instructions to getting it going were somewhat baroque and hard to find, I'm endeavoring to collect a little HOWTO here. Thanks to lazyswamp for the instructions I'm cribbing from, Paul Fox for the Linux port, and Cantrell, Shapiro, and Leventhal for the original code.
# Set up the build environment
sudo aptitude install bison flex zlib1g-dev libelf-dev libc6-dev-i386 binutils-dev libdwarf-dev
git clone https://github.com/dtrace4linux/linux.git dtrace-linux

# Install (or reinstall)
cd dtrace-linux
git pull
make clean
make all
make test # Optional, but good practice and interesting to watch
sudo make unload
sudo make install
sudo make load
Next step is probably getting this into a Chef cookbook, so I can easily deploy it on Infochimp's servers. I might also be convinced to undertake a .deb packaging, if enough people mention an interest. I've not cut one before, but it's a skill worth knowing.

(Edit: No, next step is "learn D". Hrmm . . . )