tracelogger

Logs tracing information

Syntax:


Note: You must be root to run this utility.

tracelogger -w [-b num] [-d mode] 
            [-f file] [-F 0-6] 
            [-k num] [-M] [-n num] 
            [-s num] [-S size] [-v[v...]] 

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 approximately 11 KB.
-d mode
Currently, the mode is:
1
Launch in daemon mode.
-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.
-k num
Number of allocated buffers in the kernel. Default is 32. Each buffer has a size of approximately 16 KB.
-M
Map the log file directly instead of writing. If you use this option, the log file must be in shared memory, and you must use the -S option to specify the maximum file size.
-n num
Number of logged iterations. Default is 32.
-r
Set the kernel buffer to ring mode. Default is linear mode.
-s num
Number of seconds to log. The default is 0.
-S size
The maximum size of the log file. Use M for megabytes or K for kilobytes. If you don't use M or K, the units are assumed to be bytes.
-v[v...]
Be verbose; more v characters cause more verbosity.
-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