[Previous] [Contents] [Index] [Next]

Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

tracelogger

Logs tracing information

Syntax:


Note: You must be root to run this utility.

tracelogger -Iw [-n num] [-k num] [-b num]
            [-P num] [-F 0-6 or 11] 
            [-s num.float] [-i file] 
            [-f file] [-d mode] [-D name]

Runs on:

This utility runs on x86, PPC, SH-4, ARM, and MIPS processors.

Options:

-b num
Maximum number of dynamic buffers allocated in tracelogger. Default is 64. Each buffer has a size of ~11k.
-d mode
Launch in daemon mode and create tracelogger device. Default is no device. You can also have:
1
Standby mode.
2
Circular mode.
-D name
Device name for tracelogger. Default is /dev/trace.
-f file
Name of the file to store logged events. Default is /dev/shmem/tracebuffer.kev.
-F num
Filtering for different num values, as follows:
0
Don't set any filtering.
1
Disable kernel calls class.
2
Disable interrupt class.
3
Disable process class.
4
Disable thread class.
5
Disable VThread class.
6
Disable COMM Class.
11
Disable Ring0 event in the kernel calls class.
-i file
File name to store information about the log file. Default is /dev/shmem/tracebuffer.kev.info or outputfile.info if an output file name is specified.
-I
Enable generation of the information file. It is disabled by default.
-k num
Number of allocated buffers in the kernel. Default is 32. Each buffer has a size of ~16k.
-n num
Number of logged iterations. Default is 32.
-P num
Priority. Default is 15. The main thread runs at priority; the writer thread runs at priority + 1; and the reader thread runs at priority + 2.
-r
Set the kernel buffer to ring mode. Default is linear mode.
-s num.float
Number of seconds to log. The default is 0.0.
-w
Wide events. Default is fast events.

Description:

The tracelogger utility logs the requested number of iterations, then terminates. It may be started using:

Full tracelogger support (limited control)
Instrumentation with full tracelogger support is the simplest way to obtain the tracing information. In this case, the tracelogger performs all initialization and runtime control of the instrumentation module in addition to its normal task of saving the trace buffers to the filesystem.
Partial tracelogger support (daemon mode, full control)
Instrumentation with partial tracelogger support is the most flexible way of controlling the instrumentation process. However, it requires the largest amount of user support during initialization. Except for specifying the number of buffers, the tracelogger doesn't perform any initialization of the instrumentation module and its almost exclusive task is to log the "received" trace events to the filesystem.

Examples:

Start tracelogger in wide mode and display operational information on the console screen; store the logged data in the named file and stop logging when 12 trace buffers are full.

#tracelogger -f /dev/shmem/my_tracebuffer -n 12 -w

Start tracelogger in ring mode (background) using 5 internal buffers and wait for an asynchronous signal (e.g. Ctrl-C) to stop it.

#tracelogger -r -b 5

Exit status:

-1
An error occurred.

Errors:

Severe errors cause tracelogger to terminate.

Caveats:

Run only one instance of tracelogger at a time.

See also:

traceprinter


[Previous] [Contents] [Index] [Next]