DTrace
DTrace exists to help you figure out how the system works and why the system is sluggish or acting in an unexpected manner. The name is short for Dynamic Tracing: a powerful idea pioneered by DTrace. Dynamic tracing allows one to peer into all parts of the system -- kernel, device drivers, libraries, services, web servers, applications, databases -- without any restarts, recompilations,or overhead. DTrace is a powerful tool in any programmer's toolkit, and has been included by default with various operating systems including Illumos, Solaris, Mac OS X, FreeBSD, and QNX. A Linux port is in development.
DTrace works by dynamically patching live running instructions with instrumentation code. The DTrace facility also supports Static Tracing: where user-friendly trace points are added to code and compiled-in before deployment.
DTrace provides a language, 'D', for writing DTrace scripts and one-liners. The language is like C and awk, and provides powerful ways to filter and summarize data in-kernel before passing to user-land. This is an important feature that enables DTrace to be used in performance-sensitive production environments, as it can greatly reduce the overhead of gathering and presenting data. ...more
DTrace for Beginners¶
- Tutorial: DTrace by Example
- Using DTrace to Analyze Your Webstack (short video)
- Top 10 DTrace scripts for Mac OS X
- Introducción a DTrace (in Spanish)
More DTrace¶
- DTrace FAQs
- Advanced DTrace Tips, Tricks and Gotchas
- DTrace: printf debugging for seventh-level wizards
Books¶
- DTrace Guide - now ported and updated for illumos!
- The Original Dynamic Tracing Guide available as a 408 page PDF (2008)
- Solaris Performance and Tools: takes Solaris perf analysis further with DTrace, 440 pages (2006)
- DTrace: the DTrace book of scripts and strategy, 1100 pages (2011).
Videos on DTrace¶
- Bryan Cantrill's Google Tech Talk
- Breaking Down MySQL/Percona Query Latency With DTrace
- Little Shop of Performance Horrors
- DTrace BoF at LISA10
- Brendan Gregg on DTrace at Kernel Conference Australia, 2009
- How to Build Better Applications with Oracle Solaris DTrace
- Observing Your App and Everything Else it Runs on Using DTrace
- DTracing Your Website
- The Problems Solaris Solves: Diagnosing Live Systems with DTrace
- DTrace, Goals, Successes, Failures, and Solving Problems - [Adam Leventhal][al]
- Building a monitoring framework using DTrace and MongoDB - [DanKimmel][dk]
- Debugging with DTrace - [Max Bruning][mb] - Training Director, Joyent
- Solving Problems with DTrace on any Platform - [Brendan Gregg][bg]
[al]: http://www.linkedin.com/in/adamleventhal [dk]: http://www.linkedin.com/pub/dan-kimmel/4a/88a/425 [mb]: http://www.linkedin.com/pub/max-bruning/0/337/180 [bg]: http://www.linkedin.com/pub/brendan-gregg/1/3a8/3/
dtrace.conf 2012 Videos¶
For a good overview and wrap-up, see Adam's blog post on dtrace.conf.
Title | Speaker |
---|---|
State of the Union - video | Bryan Cantrill |
Setting the Agenda - video | |
User-Level CTF - video | Adam Leventhal |
Dynamic Translators - video | Dave Pacheco |
Control flow & language enhancements - video | Eric Schrock |
Carousel ride! | |
Clang Parser for DTrace - video | John Thompson |
Visualizations - video | Brendan Gregg |
Visualizations, Enabling toolchain for seamless USDT - video | Theo Schlossnagle |
Visualizations - video | Richard Elling |
DTrace in node.js - video | Mark Cavage |
User-land probes for Erlang virtual machine - video | Scott Lystig Fritchie |
DTrace on Linux - video | Kris Van Hees |
ZFS DTrace provider | Matt Ahrens |
DTrace on FreeBSD - video | Ryan Stone |
Barriers to Adoption - video | Jarod Jenson |