DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X and FreeBSD
- By Brendan Gregg, Jim Mauro
- Published Apr 1, 2011 by Prentice Hall. Part of the Oracle Solaris Series series.
- Copyright 2011
- Dimensions: 7" x 9-1/8"
- Pages: 1152
- Edition: 1st
- ISBN-10: 0-13-209151-8
- ISBN-13: 978-0-13-209151-0
Register your product to gain access to bonus material or receive a coupon.
Product Author Bios
Brendan Gregg, Staff Engineer at Sun Microsystems, works in the Fishworks engineering group alongside DTrace's creators. He created DTraceToolkit and DTrace FAQ, and co-authored several articles about DTrace. Tariq Magdon-Ismail, VMware Staff Performance Engineer, previously specialized in performance, kernel scalability, and memory management architecture at Sun Microsystems. Chad Mynhier, Forsythe Solutions Group Master Consultant, specializes in solving performance problems on Solaris systems. He made the first external contribution to DTrace. Jim Mauro, Principal Engineer at Sun Microsystems, co-authored Solaris Internals.
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.
Visit the author's web site.
14 of 17 people found the following review helpful
Essential Solaris Companion,
This review is from: DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X and FreeBSD (Oracle Solaris Series) (Paperback)Its finally here, the great masterpiece. This books completes what "Solaris Performance & Tools" started. This new book focuses entirely on DTrace and is really several books rolled into one.
Part I gives you a complete DTrace Textbook. It breaks down the language and introduces you all the foundational concepts. It is brisk and every concept has an example making it extremely accessable.
Part II is the combination of several runbooks and a collection of cookbooks. For CPU, I/O, network, etc there is the same methodical systematic approach to exposing problems that we got in "Performance & Tools" but vastly expanded. After hitting all the fundamental resources it breaks down into various programming languages, databases, applications and daemons.
The true value of this book is here in Part II. You may know that you have a certain kind of problem, and you know that DTrace can probly find it for you, but you don't know where to start and in what... Read more
5 of 6 people found the following review helpful
Excellent book about performance analysis in general and DTrace details,
This review is from: DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X and FreeBSD (Oracle Solaris Series) (Paperback)B Rockwood provides an excellent review of the book and there is not much to add beyond that. If you are interested in the state-of-the-art of system analysis / performance analysis and the DTrace tool that provides unprecedented levels of information available in these areas, then this is a must-have book. Highly recommended!
18 of 26 people found the following review helpful
The raw power of DTrace and the social grace of engineers, together at last.,
This review is from: DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X and FreeBSD (Oracle Solaris Series) (Paperback)The last book I tried to use while at my computer was the first edition of the O'Reilly behemoth UNIX Power Tools, a small phone book in both page count and page quality. Working through a very large book of very many items front to back, as I did, might seem like a fool's errand. But Power Tools was, and in its third edition must still be, a tirelessly, relentlessly cross-referenced work. I was impressed by the vigor and care its contributors applied to relate so many points of information to each other. Moreover, I was struck by the implication that I could follow suit. It was a breath of encouragement I was grateful to receive, as I wanted to grow into power user status myself. It was also a gift I think about paying forward when I teach. Like when someone again runs off with my current copy, but in a way that doesn't stress the trust I... Read more
› See all 8 customer reviews...
Online Sample Chapter
Table of Contents
About the Authors xxxv
Part I: Introduction
Chapter 1: Introduction to DTrace 1
What Is DTrace? 1
Why Do You Need It? 1
Dynamic and Static Probes 4
DTrace Features 4
A First Look 6
Chapter 2: D Language 19
D Language Components 20
Example Programs 44
Part II: Using DTrace
Chapter 3: System View 51
Start at the Beginning 52
Observing CPUs 56
Observing Memory 95
Observing Disk and Network I/O 125
Chapter 4: Disk I/O 151
Disk I/O Strategy 154
Case Studies 269
Chapter 5: File Systems 291
Case Study 387
Chapter 6: Network Lower-Level Protocols 399
Common Mistakes 548
Chapter 7: Application-Level Protocols 557
Chapter 8: Languages 669
Chapter 9: Applications 783
Case Studies 817
Chapter 10: Databases 833
Part III: Additional User Topics
Chapter 11: Security 867
Privileges, Detection, and Debugging 867
Chapter 12: Kernel 893
Chapter 13: Tools 947
The DTraceToolkit 948
DTrace GUI Plug-in for NetBeans and Sun Studio 966
DLight, Oracle Solaris Studio 12.2 966
Mac OS X Instruments 971
Chapter 14: Tips and Tricks 987
Tip 1: Known Workloads 987
Tip 2: Write Target Software 989
Tip 3: Use grep to Search for Probes 991
Tip 4: Frequency Count 991
Tip 5: Time Stamp Column, Postsort 992
Tip 6: Use Perl to Postprocess 993
Tip 7: Learn Syscalls 994
Tip 8: timestamp vs. vtimestamp 995
Tip 9: profile:::profile-997 and Profiling 996
Tip 10: Variable Scope and Use 997
Tip 11: strlen() and strcmp() 999
Tip 12: Check Assumptions 1000
Tip 13: Keep It Simple 1001
Tip 14: Consider Performance Impact 1001
Tip 15: drops and dynvardrops 1003
Tip 16: Tail-Call Optimization 1003
Further Reading 1003
Appendix A: DTrace Tunable Variables 1005
Appendix B: D Language Reference 1011
Appendix C: Provider Arguments Reference 1025
Appendix D: DTrace on FreeBSD 1045
Enabling DTrace on FreeBSD 7.1 and 8.0 1045
DTrace for FreeBSD: John Birrell 1047
Appendix E: USDT Example 1051
USDT Bourne Shell Provider 1052
Case Study: Implementing a Bourne Shell Provider 1057
Appendix F: DTrace Error Messages 1063
Aggregation Drops 1065
Dynamic Variable Drops 1066
Invalid Address 1066
Maximum Program Size 1067
Not Enough Space 1068
Appendix G: DTrace Cheat Sheet 1069
Finding Probes 1069
Finding Probe Arguments 1070
Suggested Reading 1073
Vendor Manuals 1075
Download the sample pages (includes Chapter 9 and Index)
Book + eBook Bundle
Book Price $43.99
eBook Price $15.40
eBook formats included
This book includes free shipping!
This book includes free shipping!
Includes EPUB, MOBI, and PDF
About eBook Formats
This eBook includes the following formats, accessible from your Account page after purchase:
EPUBThe open industry format known for its reflowable content and usability on supported mobile devices.
MOBIThe eBook format compatible with the Amazon Kindle and Amazon Kindle applications.
PDFThe popular standard, used most often with the free Adobe® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discretely watermarking it with your name, making it uniquely yours.
Get access to thousands of books and training videos about technology, professional development and digital media from more than 40 leading publishers, including Addison-Wesley, Prentice Hall, Cisco Press, IBM Press, O'Reilly Media, Wrox, Apress, and many more. If you continue your subscription after your 30-day trial, you can receive 30% off a monthly subscription to the Safari Library for up to 12 months. That's a total savings of $199.