Linux Trace Toolkit Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
NAME
tracedaemon - The trace daemon component of the Linux Trace Toolkit (LTT)
SYNOPSIS
tracedaemon [ -d ] [ -p ] [ -m ] [ -f ] [ -o ] [ -bBufSize ] [ -nNBuffers ] [ -eEventTypes ] [ -DEventTypes ] [ -cCPU-ID ] [ -PPID ] [ -GPGRP ] [ -gGID ] [ -uUID ] [ -s { dCallDepth | lLowerBound | uUpperBound } ] [ -t { sSeconds | uMicroseconds } ] [ TraceDevice ] [ TraceFile ] [ ProcFile ]
DESCRIPTION
Note for embedded Linux users: The trace daemon is run on the target system.
The tracedaemon program is the daemon component of Linux Trace Toolkit (LTT). It's primary function is to collect the data from the trace module in the kernel and to commit it to a file. In order to do so, it needs a minimum of 3 arguments: the device by which the trace module is accessible, the file in which to commit the trace and a file to write the description of the system as found is /proc on startup. The later is used by the data decoder in order to reconstruct the system as it was when the trace started.
Moreover, the trace daemon can be used to configure the trace module by passing it different command line arguments. The trace module is configured using a series of calls to ioctl(). Contrary to the command line arguments options possible for the trace decoder, the options given to the daemon have a direct impact on the data collected by the kernel. That is, if some data is configured to be omitted then that data will not be available in the raw trace and cannot be extracted by the decoder. On the other hand if the same is done on the decoder level, the data might not be present in the decoder's output, but it will still be available in the raw trace. Therefore, the choice of configuration of the daemon should be selected with caution, the data omitted being truly omitted in the trace. You have been warned!
OPTIONS
-d Set the trace module to it's default configuration. It is wise to always include this options since it makes sure that the trace module is set to it's default configuration even if it has already been used by a previous run of the daemon.
-p Print the current trace mask. When the trace daemon is already running, simply call on tracedaemon -p to print the current trace mask. You won't need to provide the daemon with any other option whatsoever. You don't even need to provide the link to the current trace device.
-m Modify the curren trace mask. When the trace daemon is already running, use this option with the -e or -D options to modify the curren trace mask. As with -p, you don't need to provide any of the traditionnaly required files.
-f Use the lock-free tracing scheme. If -b and/or -n are unspecified, the defaults will be 4 buffers of 512 K each. If -f is not specified, the locking scheme will be used with 2 buffers of 1000000 each.
-o Force the use of gettimeofday() timestamping. The default timestamping method is TSC timestamping, if the platform supports it, otherwise gettimeofday() timestamping is used. This option avoids TSC timestamping even if the platform supports it.
-b Sets the trace module's data collection buffer to the size given by BufSize. Giving too small of a size will result in a loss of events and too large of a size will result in lost kernel space. The default size for the locking scheme is 1000000 bytes. The default size for the lock-free scheme is 524288 (512K). For the lock-free scheme, the size should be a power of 2; if it isn't, it will be rounded down to the next lower power of 2. As of 26/03/2000, the trace module will not accept sizes below 1000 bytes.
-n Sets the number of trace module data collection buffers for the lock-free scheme to the number given by NBuffers. This option is only available if the -f (lock-free) option is used i.e. the locking version can't use anything other than 2 buffers. The default number of buffers for the lock-free scheme is 4. The number of buffers should be a power of 2; if it isn't, it will be rounded down to the next lower power of 2. The maximum number of lock-free buffers is 256.
-e Trace only the given events. This will set the trace mask passed to the module to include the event given in EventTypes. This option can be used more than once to specify all the events to be traced. The following is the list of event types traced:
-D Sets the module to record the details of the event given. See -e for the events available. This too can be used more than once to specify all the events for which the details are recorded. The details of the start trace event are always recorded, whether -D is used to specify this or not. The reason is the same than for the -e option. For the data decoder to be able to draw the event graph, the following events must have their details recorded : syscall, irq, trap entry and exit and schedchange.
-c Trace CPU-ID. Only include events that occurred on CPU-ID in trace.
-P Trace PID. Only include process number PID in trace.
-G Trace process group. Only include processes part of PGRP in trace.
-g Trace GID. Only include processes part of GID in trace.
-u Trace UID. Only include processes belonging to UID in trace.
-s Set the syscall EIP fetching policy. If -sd is used then the instruction pointer (EIP) will be fetched up the call stack at the given CallDepth. If the EIP has to be fetched from a certain range then -su and -sl must be used in this sequence. Each must be followed by a hexadecimal formatted address, 0xXXXXXXXX. These will be the UpperBound and the LowerBound used to fetch the EIP.
-t Set the time for which the daemon should run. -ts sets the number of seconds to run to Seconds. -tu sets the number of microseconds to run to Microseconds.
<<< Previous Page | Home | Up | Next Page >>> |
Linux trace toolkit | Daemon command-line operation |