Solaris admins have a powerful troubleshooting tool in DTrace. DTrace is a dynamic tracing utility for observing, debugging and tuning system behavior. DTrace is incredibly flexible and can be used for anything and everything, by both system administrators and software developers. It observes operating system and application behavior userland and kernel. Although powerful, it's easy on system resources, so it can run on live production servers without problems.
Some of the tasks for which DTrace is used are:
- Finding performance bottlenecks, like CPU and memory hogs and disk I/O
- Debugging kernel modules and drivers on a running kernel
- Debugging Java applications
- Code optimization in many programming languages
In this era of Web applications for everything under the sun, tracing performance bottlenecks is an incredibly complex task. DTrace hones in on the trouble spots to save you from having to review all the code, line-by-line.
All of this flexibility comes with a price: You need to know what to look for, and how to script DTrace to collect the information you want. There are bales of prefab DTrace scripts for common tasks and study, but you'll have to know how to customize them to hone in on the desired information. Additionally, there all kinds of blogs and forums devoted to DTrace.
Why such rampant DTrace fandom? Because it finds problems no other tool can find, and it finds them quickly.
What's the best way to get started? See the links below for all kinds of excellent help and information. The interviews with DTrace guru Jarod Jenson are especially good for learning some real-world ways to use DTrace, and which other utilities are needed.
DTrace has been ported to FreeBSD and Mac OS X, and will probably appear in other Unix-type operating systems over time.