Capturing Trace Data

The program that captures data is the “messenger” between the instrumented kernel and the filesystem.

Figure 1. Possible data capture configurations.

The main function of the data-capture program is to send the buffers given to it by the instrumented kernel to an output device (which may be a file or something else). In order to accomplish this function, the program must also:

You must configure the instrumented kernel before logging. The instrumented kernel configuration settings include:

Note: The instrumented kernel retains the settings, and multiple programs access a single instrumented kernel configuration. Changing the settings in one process supersedes the settings made in another.

We've provided tracelogger as the default data-capture utility. Although you can write your own utility, there's little need to.

You can control the capture of data via qconn (under the control of the IDE), tracelogger (from the command line), or directly from your application. All three approaches use the TraceEvent() function to control the instrumented kernel:

Figure 2. Controlling the capture of trace data.

Let's look first at using tracelogger, and then we'll describe how you can use TraceEvent() to control tracing from your application.