February 23, 2019

Opening Solaris - page 6

The Solaris 10 Pitch

  • September 15, 2005
  • By Martin C. Brown

For a developer or administrator there are few things more frustrating than tracing the internal workings of an application to find out what is going wrong. Solaris has for a long time included the truss tool which traces and reports on the execution of an application, albeit with limited control and flexibility for in-depth examination. The truss tool was also limited to system calls, signals and user-level functions and was therefore less than useful for diagnosing faults in applications that may be related to internal libraries and processes.

The DTrace tool is an extension of this original idea, but with a much wider scope and more configurability. There almost 40,000 different probes built into DTrace and you can write a "script" to monitor specific aspects of an execution. In effect, the DTrace tool is like a combination of the original truss and a very flexible debugger. Unlike debugging, DTrace doesn't require any special options to enable tracing the code and this means that you can trace not only your application, but also the internals of the libraries, system calls, and kernel functions called during the execution.

Because DTrace is not tied to the method you use to compile your application, administrators can use DTrace to find out why applications aren't running or why kernel modules aren't loading, without ever needing access to the source code. DTrace is still a relatively new tool and extensions are being provided for other applications, libraries and environments to improve the level of information provided. For example, it is possible to examine the internal workings of Java applications, a boon for Java developers. In recent months we've also seen DTrace functionality added for PHP, Perl, Python, and many others.

Most Popular LinuxPlanet Stories