tracelogger's modes of operation
QNX SDP8.0System Analysis Toolkit (SAT) User's GuideUser
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 |
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, this utility might fail with a resource busymessage. To help avoid this:
- Start tracelogger before your application issues an _NTO_TRACE_START or _NTO_TRACE_STARTNOSTATE command.
- Don't leave tracing on indefinitely; be sure to issue an _NTO_TRACE_STOP after each _NTO_TRACE_START or _NTO_TRACE_STARTNOSTATE command.
For a full description of the tracelogger utility and its options, see its entry in the Utilities Reference.
Page updated:
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 logging again to capture the state information that's emitted by the
_NTO_TRACE_START command.
This information includes the thread IDs and process names.