Tip of the Trade: DTrace

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. DTrace is considered by many to be one of the best features in Solaris 10. The troubleshooting tool is a powerful dynamic tracing utility for observing, debugging and tuning system behavior. The one downside? Its complexity.

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.

DTrace Howto Guides
BigAdmin System Administration Portal
An Interview with DTrace Guru Jarod Jenson

This article was originally published on Sep 26, 2006
Page 1 of 1

Thanks for your registration, follow us on our social networks to keep up-to-date