tracelogger's modes of operation

You can run tracelogger in several modes—depending on how and what you want to trace—by specifying the following command-line options:

Mode Option The kernel: tracelogger:
Continuous -c Logs events Captures the events, and continues to do so until terminated
Daemon -d1 Doesn't log eventsa Waits passivelya
Iterations (the default) -n Logs events Captures num_buffers of data and then terminates
Ring -r Logs events Doesn't capture events until it gets a SIGINT signal, or an application calls TraceEvent()b with a command of _NTO_TRACE_STOP
Time-based -s Logs events Captures events for the specified number of seconds

a In daemon mode, logging starts when an application calls TraceEvent(_NTO_TRACE_START) and continues until an application calls TraceEvent(_NTO_TRACE_STOP), or until you terminate tracelogger.

b When you terminate tracing in ring mode, tracelogger stops logging events, and then briefly restarts and stops it again so it can capture the state information that's emitted by the _NTO_TRACE_START command. This information includes the thread IDs and names of processes.

In the non-daemon modes, you configure, start, and stop the tracing from the command line. In daemon mode, your application must do everything from code, but if you also specify the -E option, tracelogger enables all events in all classes, and you can use the -F option to set up filtering.

Here's an outline of the strengths, weaknesses, and features of these modes:

Feature Non-daemon mode Daemon mode Daemon mode with -E
tracelogger support Full Limited Full
Controllability Limited Full Full
Events recorded by default All None All
Configuration difficulty Easy Harder Easy
Configuration method Command line only User program, using calls to TraceEvent() Command line and user program
Logging starts Instantaneously User program, using calls to TraceEvent() User program, using calls to TraceEvent()
Note: If an application has called TraceEvent(_NTO_TRACE_START), and you then try to start tracelogger, tracelogger might fail with a “resource busy” message. To help avoid this:

For a full description of the tracelogger utility and its options, see its entry in the Utilities Reference.