skip to main content
Skip header Section
DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X and FreeBSDApril 2011
Publisher:
  • Prentice Hall Press
  • One Lake Street Upper Saddle River, NJ
  • United States
ISBN:978-0-13-209151-0
Published:11 April 2011
Pages:
1152
Skip Bibliometrics Section
Bibliometrics
Skip Abstract Section
Abstract

The Oracle Solaris DTrace feature revolutionizes the way you debug operating systems and applications. Using DTrace, you can dynamically instrument software and quickly answer virtually any question about its behavior. Now, for the first time, there's a comprehensive, authoritative guide to making the most of DTrace in any supported UNIX environment--from Oracle Solaris to OpenSolaris, Mac OS X, and FreeBSD. Written by key contributors to the DTrace community, DTrace teaches by example, presenting scores of commands and easy-to-adapt, downloadable D scripts. These concise examples generate answers to real and useful questions, and serve as a starting point for building more complex scripts. Using them, you can start making practical use of DTrace immediately, whether you're an administrator, developer, analyst, architect, or support professional. The authors fully explain the goals, techniques, and output associated with each script or command. Drawing on their extensive experience, they provide strategy suggestions, checklists, and functional diagrams, as well as a chapter of advanced tips and tricks. You'll learn how to Write effective scripts using DTrace's D language Use DTrace to thoroughly understand system performance Expose functional areas of the operating system, including I/O, filesystems, and protocols Use DTrace in the application and database development process Identify and fix security problems with DTrace Analyze the operating system kernel Integrate DTrace into source code Extend DTrace with other tools This book will help you make the most of DTrace to solve problems more quickly and efficiently, and build systems that work faster and more reliably.

Cited By

  1. ACM
    Eisner D, Wuersching R, Schnappinger M and Pretschner A Probe-based syscall tracing for efficient and practical file-level test traces Proceedings of the 3rd ACM/IEEE International Conference on Automation of Software Test, (126-137)
  2. ACM
    Elsner D, Wuersching R, Schnappinger M, Pretschner A, Graber M, Dammer R and Reimer S Build system aware multi-language regression test selection in continuous integration Proceedings of the 44th International Conference on Software Engineering: Software Engineering in Practice, (87-96)
  3. ACM
    Alpernas K, Panda A, Ryzhyk L and Sagiv M Cloud-Scale Runtime Verification of Serverless Applications Proceedings of the ACM Symposium on Cloud Computing, (92-107)
  4. ACM
    Han X, Mickens J, Gehani A, Seltzer M and Pasquier T Xanthus: Push-button Orchestration of Host Provenance Data Collection Proceedings of the 3rd International Workshop on Practical Reproducible Evaluation of Computer Systems, (27-32)
  5. ACM
    Gebai M and Dagenais M (2018). Survey and Analysis of Kernel and Userspace Tracers on Linux, ACM Computing Surveys, 51:2, (1-33), Online publication date: 31-Mar-2019.
  6. ACM
    Vef M, Tarasov V, Hildebrand D and Brinkmann A (2018). Challenges and Solutions for Tracing Storage Systems, ACM Transactions on Storage, 14:2, (1-24), Online publication date: 25-May-2018.
  7. ACM
    Sun H, Bonetta D, Humer C and Binder W Efficient dynamic analysis for Node.js Proceedings of the 27th International Conference on Compiler Construction, (196-206)
  8. ACM
    Spinellis D (2018). Modern debugging, Communications of the ACM, 61:11, (124-134), Online publication date: 26-Oct-2018.
  9. ACM
    Baudart G, Mandel L, Tardieu O and Vaziri M A reactive language for analyzing cloud logs Proceedings of the 5th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems, (61-70)
  10. Doray F and Dagenais M (2017). Diagnosing Performance Variations by Comparing Multi-Level Execution Traces, IEEE Transactions on Parallel and Distributed Systems, 28:2, (462-474), Online publication date: 1-Feb-2017.
  11. ACM
    Chamith B, Svensson B, Dalessandro L and Newton R Instruction punning: lightweight instrumentation for x86-64 Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation, (320-332)
  12. ACM
    Walter M and Karlsson S Software Tools for Low-Level Software and Operating Systems Classes Proceedings of the 19th Workshop on Computer Architecture Education, (16-23)
  13. ACM
    Vanga M, Bastoni A, Theiling H and Brandenburg B Supporting low-latency, low-criticality tasks in a certified mixed-criticality OS Proceedings of the 25th International Conference on Real-Time Networks and Systems, (227-236)
  14. ACM
    Chamith B, Svensson B, Dalessandro L and Newton R (2017). Instruction punning: lightweight instrumentation for x86-64, ACM SIGPLAN Notices, 52:6, (320-332), Online publication date: 14-Sep-2017.
  15. ACM
    Chamith B, Svensson B, Dalessandro L and Newton R Living on the edge: rapid-toggling probes with cross-modification on x86 Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, (16-26)
  16. ACM
    Chamith B, Svensson B, Dalessandro L and Newton R (2016). Living on the edge: rapid-toggling probes with cross-modification on x86, ACM SIGPLAN Notices, 51:6, (16-26), Online publication date: 1-Aug-2016.
  17. Couturier D and Dagenais M (2015). LTTng CLUST, Advances in Software Engineering, 2015, (2-2), Online publication date: 1-Jan-2015.
  18. Malka M, Amit N and Tsafrir D Efficient intra-operating system protection against harmful DMAs Proceedings of the 13th USENIX Conference on File and Storage Technologies, (29-44)
  19. ACM
    Fu Q, Zhu J, Hu W, Lou J, Ding R, Lin Q, Zhang D and Xie T Where do developers log? an empirical study on logging practices in industry Companion Proceedings of the 36th International Conference on Software Engineering, (24-33)
  20. ACM
    Liao Y and Langweg H Cost-benefit analysis of kernel tracing systems for forensic readiness Proceedings of the 2nd international workshop on Security and forensics in communication systems, (25-36)
  21. ACM
    Mihajlović B, Žilić Ž and Gross W (2014). Dynamically Instrumenting the QEMU Emulator for Linux Process Trace Generation with the GDB Debugger, ACM Transactions on Embedded Computing Systems, 13:5s, (1-18), Online publication date: 15-Dec-2014.
  22. ACM
    Li H and Thompson S Multicore profiling for Erlang programs using percept2 Proceedings of the twelfth ACM SIGPLAN workshop on Erlang, (33-42)
Contributors
  • Sun Microsystems

Recommendations

Maulik A Dave

Debuggers are tools used by software developers to debug their programs. DTrace, an advanced debugger, is described in detail in this book, including the ways to use it for both systems programming and applications programming. The capabilities, associated examples, and application areas are covered. The observations, which can be done in DTrace, are from low-level central processing unit (CPU) observations through high-level database accesses. The book also presents related available graphical user interfaces, apart from the command line options. The script language developed for using DTrace is also described in detail with examples. The first part consists of two chapters. It introduces DTrace, with its architecture, a list of its main features, terminology, and the scripting language for using it. DTrace-specific terms-co-consumer, provider, probe, variables, and so on-are introduced. The scripting language is described with details of its programming constructs, built-in variables, and system function calls. The part ends with examples written in the scripting language. The second part (chapters 3 through 10) is on using DTrace. The third chapter begins by describing the ways to observe the CPU using DTrace. This is followed by descriptions of the ways to observe various types of memory activities. The chapter ends by introducing input/output (I/O) observations. Chapter 4 is completely devoted to the disk I/O, and begins by presenting a generic I/O module internals diagram and a detailed discussion on ways to observe disk I/O. Scripts for various types of drivers-small computer system interface (SCSI), serial advanced technology attachment (SATA), integrated drive electronics (IDE), and serial attached SCSI (SAS)-are shown. The chapter ends by describing two case studies. Chapter 5 covers file systems and begins by introducing read and write operations on the file systems. It explains scripts common across all types of file systems and scripts for specific file systems, such as virtual file system (VFS), Unix file system (UFS), Z file system (ZFS), and hierarchical file system plus (HSF+). It also presents scripts for various drivers for CD-ROMs and other similar devices. The chapter ends by presenting case studies. Chapter 6, on network I/O, describes the ways of observing network accesses. The scripts for various network protocols (such as sockets, transmission control protocol (TCP), Internet protocol (IP), user datagram protocol (UDP), Internet control message protocol (ICMP), XDR, and ethernet) are presented. The chapter ends by showing common mistakes in observing network I/O. The next four chapters focus on application programming. Chapter 7 is on application-level network protocols. Scripts for protocols-network file system (NFSv3, NFSv4), hypertext transfer protocol (HTTP), the domain name system (DNS), Internet (SCSI), the fibre channel block I/O, the secure shell (SSH), the network information service (NIS), and the lightweight directory access protocol (LDAP)-are presented. Chapter 8 presents scripts for languages such as C, C++, Java, JavaScript, Perl, PHP, Python, and Ruby. It ends with shell and Tcl scripts. Chapter 9 discusses case studies of applications and explains the use of DTrace for an application involving the Firefox Web browser and an application involving xVNC, which is a virtual network computing server for X-server-based desktops. Chapter 10 describes details of using DTrace for observing database accesses for MySql, PostgreSQL, and Oracle. Chapter 11 explains how DTrace can be applied to security-related tasks. DTrace can be used as a part of systems that find suspicious activities and also to debug privileges-related code in applications. Chapter 12 is on using DTrace to analyze operating system kernels. After presenting a functional diagram, it describes, using example scripts, ways to observe kernel-related activities. Chapter 13 covers tools based on DTrace and begins with an overview of DTrace Toolkit, a collection of more than 200 scripts. It also introduces other tools such as Chime (a visualization tool) and Dlight (an interactive observability tool). The last chapter provides a list of DTrace tips. Readers are expected to have strong knowledge of computer organization and development techniques. The book is a good demonstration of a modern debugger and available debugging techniques, and a good tutorial and reference for DTrace. It has a number of practical command prompts and commands related to DTrace, as well as many code examples written in the scripting languages associated with DTrace. DTrace users will benefit most from the book. It is a good starting point for designers and researchers of new debuggers. Online Computing Reviews Service

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.