Command-line operation

Linux Trace Toolkit Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

4. Trace daemon command-line operation

NAME

tracedaemon - The trace daemon component of the Linux Trace Toolkit (LTT)

SYNOPSIS

tracedaemon [ -d ] [ -bBufSize ] [ -eEventTypes ] [ -DEventTypes ] [ -cCPU-ID ] [ -pPID ] [ -GPGRP ] [ -gGID ] [ -uUID ] [ -s { dCallDepth | lLowerBound | uUpperBound } ] [ -t { sSeconds | uMicroseconds } ] [ TraceDevice ] [ TraceFile ] [ ProcFile ]

DESCRIPTION

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.

-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 is 1000000 bytes. As of 26/03/2000, the trace module will not accept sizes below 1000 bytes.

-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:

- "START" - Trace start
- "SYS_ENTRY" - System call entry
- "SYS_EXIT" - System call exit
- "TRAP_ENTRY" - Trap entry
- "TRAP_EXIT" - Trap exit
- "IRQ_ENTRY" - Interrupt entry
- "IRQ_EXIT" - Interrupt exit
- "SCHED" - Schedule change
- "KTIMER" - Kernel timer
- "SIRQ" - Soft IRQ management
- "PROCESS" - Process management
- "FS" - File system management
- "TIMER" - Timer management
- "MEM" - Memory management
- "SOCKET" - Socket communications
- "IPC" - System V IPC communications
- "NET" - Network device management

If you've compile the trace daemon with RTAI support, then the following event types can be configured:

- "RTMNT" - RTAI mount
- "RTUMNT" - RTAI unmount
- "RTGIRQE" - RTAI global IRQ entry
- "RTGIRQX" - RTAI global IRQ exit
- "RTOIRQE" - RTAI CPU own IRQ entry
- "RTOIRQX" - RTAI CPU own IRQ exit
- "RTTRAPE" - RTAI trap entry
- "RTTRAPX" - RTAI trap exit
- "RTSRQE" - RTAI SRQ entry
- "RTSRQX" - RTAI SRQ exit
- "RTSWTCHL" - RTAI switch to Linux
- "RTSWTCHR" - RTAI switch to RT
- "RTSCHED" - RTAI scheduling change
- "RTTASK" - RTAI task management
- "RTTIMER" - RTAI timer management
- "RTSEM" - RTAI semaphore communications
- "RTMSG" - RTAI message communications
- "RTRPC" - RTAI RPC communications
- "RTMBX" - RTAI message box communications
- "RTFIFO" - RTAI FIFO communications
- "RTSHM" - RTAI shared memory management
- "RTPOSIX" - RTAI Posix layer
- "RTLXRT" - RTAI LXRT layer
- "RTLXRTI" - RTAI LXRT-informed layer

Note that the start trace event is always traced, whether it is configured as such or not. This is done by the trace module and should not be modified since the trace decoder needs information included in this first event.

-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