Chapter 15. DTrace

IN THIS CHAPTER

  • Getting started

  • Tracing syntax

  • The dtrace command

  • Speculative tracing

  • Boot-time tracing

  • Postmortem tracing

  • User-level and high-level language tracing

The DTrace facility is one of the most innovative capabilities within OpenSolaris. DTrace enables you to observe and understand the dynamic behavior of the entire software system, from the low-level kernel details to high-level application behavior, in ways that were not possible prior to the creation of DTrace.

DTrace is fundamentally different from previous tools. Using DTrace enables you to get a complete view of all of the software running. The software does not have to be instrumented or explicitly built for monitoring. Instead, the standard software that is normally running in production can be observed at any time using DTrace. As such, there is no special application that the software must run under to observe the system's behavior. Instead, if you notice a problem or the system is in a state that needs further investigation, you can immediately start using DTrace to dive into the running system to understand what is happening.

For DTrace to be used in this fashion, on production systems, it is critical that DTrace be safe. This safety is the second key innovation within DTrace. Previous tracing or debugging facilities could not be used on live, production systems without the possibility that the system could be destabilized or even crash. However, use on production systems was one of the key design ...

Get OpenSolaris™ Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.