View Source

DTrace is a performance analysis and troubleshooting tool included by default with various operating systems, including illumos, Solaris, Mac OS X and FreeBSD. A Linux port is in development.

*DTrace instruments all software.*

Not just user-level software, including applications, databases and webservers, but also the operating system kernel and device drivers. The name is short for Dynamic Tracing: an instrumentation technique pioneered by DTrace which dynamically patches 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|http://dtrace.org/blogs/about/]

There is also a [pony|http://dtrace.org/blogs/about/dtracepony/].

h1. DTrace for Beginners

* [Tutorial: DTrace by Example|http://developers.sun.com/solaris/articles/dtrace_tutorial.html]
* [Using DTrace to Analyze Your Webstack|http://www.youtube.com/watch?v=47mgwxnbM9M] (short video)
* [Top 10 DTrace scripts for Mac OS X|http://dtrace.org/blogs/brendan/2011/10/10/top-10-dtrace-scripts-for-mac-os-x/]
* [Introducción a DTrace|http://www.youtube.com/watch?v=rM48nvJiZAQ] (in Spanish)

h2. More DTrace

* [DTrace FAQs|http://wiki.illumos.org/display/illumos/DTrace+FAQs]
* [Advanced DTrace Tips, Tricks and Gotchas|http://dtrace.org/resources/bmc/dtrace_tips.pdf]
* [DTrace: printf debugging for seventh-level wizards|http://sartak.org/talks/perl-oasis-2012/dtrace/]

h2. Books

* [DTrace Guide|http://dtrace.org/guide/preface.html] \- now ported and updated for illumos\!
* Dynamic Tracing Guide: the original reference manual, freely available as a 408 page [PDF|http://download.oracle.com/docs/cd/E19253-01/817-6223/817-6223.pdf] (2008)
* [Solaris Performance and Tools|http://www.amazon.com/Solaris-Performance-Tools-Techniques-OpenSolaris/dp/0131568191/ref=sr_1_1?s=books&ie=UTF8&qid=1328815305&sr=1-1]: takes Solaris perf analysis further with DTrace, 440 pages (2006)
* DTrace: the DTrace book of scripts and strategy, 1100 pages (2011). Read a [sample chapter on Brendan's blog|http://dtrace.org/blogs/brendan/2011/02/23/dtrace-book-sample-chapter-file-systems/].

h3. Videos About the DTrace Book

* [Introduction to the DTrace Book|http://smartos.org/2010/10/24/introduction-to-the-dtrace-book/]
* [What's in the DTrace Book|http://www.youtube.com/watch?v=k7mwj9Km3fg]
* [Brendan's talk at BayLISA about DTrace and the DTrace book|http://dtrace.org/blogs/brendan/2011/06/28/baylisa-talk/]
* [Updated DTrace book intro, DTrace book and Solaris 11|http://dtrace.org/blogs/brendan/2011/10/02/dtrace-book-short-videos/]

h2. Blogs

DTrace.org:
* [Adam Leventhal|http://dtrace.org/blogs/ahl/]
* [Bill Pijewski|http://dtrace.org/blogs/wdp/]
* [Brendan Gregg|http://dtrace.org/blogs/brendan/]
* [Bryan Cantrill|http://dtrace.org/blogs/bmc/]
* [Dave Pacheco|http://dtrace.org/blogs/dap]
* [Eric Schrock|http://dtrace.org/blogs/eschrock/]
* [Robert Mustacchi|http://dtrace.org/blogs/rm/]

h2. Videos on DTrace

* [Bryan Cantrill's Google Tech Talk|http://video.google.com/videoplay?docid=-8002801113289007228]
* [Breaking Down MySQL/Percona Query Latency With DTrace|http://dtrace.org/blogs/brendan/2011/07/06/breaking-down-mysqlpercona-query-latency-with-dtrace/]
* [Little Shop of Performance Horrors|http://smartos.org/2009/11/06/video-little-shop-of-performance-horrors/]
* [DTrace BoF at LISA10|http://smartos.org/2010/11/17/dtrace-bof-at-lisa10/]
* [Brendan Gregg on DTrace|http://www.youtube.com/playlist?list=PLE0C1BA9B7A144AE0] at the Kernel Conference Australia, 2009
* [How to Build Better Applications with Oracle Solaris DTrace|http://www.beginningwithi.com/comments/2010/10/24/how-to-build-better-applications-with-oracle-solaris-dtrace/]
* [Observing Your App and Everything Else it Runs on Using DTrace|http://www.beginningwithi.com/comments/2010/05/30/observing-your-app-and-everything-else-it-runs-on-using-dtrace/]
* [DTracing Your Website|http://www.beginningwithi.com/comments/2010/07/27/dtracing-your-website/]
* [The Problems Solaris Solves: Diagnosing Live Systems with DTrace|http://www.beginningwithi.com/comments/2010/05/26/the-problems-solaris-solves-4-diagnosing-live-systems-with-dtrace/]