 | Level: Intermediate Martin Brown (mc@mcslp.com), Professional writer, Freelance
31 Mar 2009 If you are developing a UNIX® application, then you can trace and debug
the running application and extract the information you need from it. But
what if you want to know what is going on inside a UNIX application and you
don't have access to the source code?This tutorial looks at some systems that enable you to trace the execution of applications and work out what they are doing without having to make any modifications to the source code, and even without having to stop and restart the application.
Before you start
This tutorial is for UNIX system developers and administrators who are looking for the best ways to troubleshoot applications running on their systems. To get the most out of this tutorial, you should have a basic knowledge of the UNIX operating system and how it operates. Some basic programming experience is useful but is not required.
About this tutorial
Most developers and systems administrators know what should happen in their operating
system and with their applications, but sadly, this isn't always the case. There are times when an application has failed, or is not behaving as you expect, and you need to find out more information. By using your existing knowledge of how your application should work and some basic UNIX skills, you can trace the application to find out what is causing the problem. This tutorial will teach you the basic techniques of using tracing tools to find out what your application is doing behind the scenes.
First, the tutorial looks at the distinction between debugging and tracing, and how
the two solutions differ. Then it examines some specific examples of where tracing can
be used to solve problems in your application. DTrace provides elements of both
system tracing and debugging, and also provides you with the ability to time and
benchmark applications. Finally, the tutorial shows how to trace the information being exchanged between network computers to help find problems in network applications.
|  |