Extract trace events and log them to a file (QNX)
tracelogger [options]
If you don't specify -f, trace events are logged to standard output, allowing you to pipe them directly into the traceinfo utility.
If you don't specify this option, tracelogger will set this high water mark to 50%.
The tracelogger utility automatically extracts trace events and logs them to a file. The logged event data is stored in a raw binary format that you can display in human-readable form with the traceinfo utility. Together, these utilities provide a means of capturing runtime events that you can review when diagnosing problems.
Trace events are maintained by the Process Manager (Proc) in an in-memory buffer. When programs call one of the Trace*() library functions, a trace event is generated and quickly added to this in-memory buffer. For information on this family of functions, see the Watcom C Library Reference.
Most of the system managers (Dev, Fsys, Proc, Net, ...) generate trace events while they operate. To adjust the severity of the events that are logged as well as other trace parameters, use the tracectrl utility.
To have tracelogger extract data from the trace buffer immediately, you can use the SIGALRM signal. For example:
slay -s SIGALRM tracelogger
The tracelogger utility must be started by root and is typically run in
the background. To stop tracelogger, make sure you're logged in as
root, then type:
slay tracelogger |
Start in the background and create logfiles under /tracedata based on month and day (e.g. trace events on March 12 will be appended to the file /tracedata/data.0312). Also, extract events if the trace buffer becomes 20% full or if the 20% mark isn't reached after 3 minutes:
tracelogger -f /tracedata/data.%m%d -p 20 -t 3 &
Pipe trace events into the traceinfo program:
tracelogger -p 20 | traceinfo -
qnx_trace_close(), qnx_trace_info(), qnx_trace_open(), qnx_trace_read(), qnx_trace_severity(), qnx_trace_trigger(), and Trace*() functions in the Watcom C Library Reference.