[Previous] [Contents] [Next]

tracectrl

Display and change trace parameters (QNX)

Syntax:

tracectrl [-i] [-n node] [-p percent_full] [-s severity]

Options:

-i
Display current trace parameters.
-n node
Query the specified node (default is this node).
-p percent_full
Set the high water mark which triggers the logging process (e.g. tracelogger). If you specify a percent_full of 0, a trigger will occur on every trace event. For more information, see tracelogger.
-s severity
Tell Proc to save only those trace events that meet or exceed this severity level. You can specify a severity argument from 0 (most critical) to 7 (least critical).

Description:

The tracectrl utility lets you display or change trace parameters.

Trace events are stored in chronological order in the Process Manager's in-memory trace buffer. The following parameters, which tracectrl displays when invoked with the -i option, reflect the Process Manager's current trace capabilities:

Overruns
The number of overruns that have occurred. An overrun occurs if the trace buffer has become completely full and another trace event is added to the buffer. Adding a trace event to the full buffer causes the oldest event to be discarded.

If overruns are occurring, you should do either or both of the following:

Severity
A severity level. The buffer stores any events that meet or exceed this level (0 is most critical, 7 is the least).
Reader
The process ID of the logging process currently extracting events from the trace buffer. For example, if tracelogger is running, this value will be tracelogger's pid.
BufferSize
The size, in bytes, of the trace buffer. To set this size, use Proc's -T option.
DataSize
A running total of the number of bytes of data in the trace buffer.
Trace Selector
The memory selector of the trace buffer; Proc owns this selector.
High Water
The number of bytes the trace buffer must contain before the logging process is triggered. This number reflects the value entered with the -p option on tracelogger or tracectrl.
Proxy
The proxy to trigger when the trace buffer contains the number of bytes indicated by High Water. This proxy is set up between Proc and the logging process when the logging process is first run. The value has meaning only if there is a reader.

Examples:

Save events of severity 0 to 3 and trigger the logging process (e.g. tracelogger) when the trace buffer is 60% full:

    tracectrl -s 3 -p 60

Exit status:

0
Successful completion.
>0
An error occurred.

See also:

Proc, traceinfo, tracelogger

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.


[Previous] [Contents] [Next]