File: ltt-daemon-commandline.html

package info (click to toggle)
ltt 0.9.5pre6-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,256 kB
  • ctags: 1,630
  • sloc: ansic: 17,284; sh: 8,010; makefile: 252
file content (332 lines) | stat: -rw-r--r-- 9,153 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <title>Command-line operation</title>
</head>
<body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF">
<TABLE WIDTH="100%" BORDER="0" BGCOLOR="#000000" CELLPADDING="1" CELLSPACING="0">
<TR>
<TH COLSPAN="4" ALIGN="center">
<FONT COLOR="#FFFFFF" SIZE="5">Linux Trace Toolkit Reference Manual</FONT>
</TH>
</TR>
<TR>
<TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left">
<A HREF="ltt-dataacquisition.html">
<FONT COLOR="#FFFFFF" SIZE="3">
<B>&#60;&#60;&#60; Previous Page</B>
</FONT>
</A>
</TD>
<TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center">
<A HREF="index.html">
<FONT COLOR="#FFFFFF" SIZE="3">
<B>Home</B>
</FONT>
</A>
</TD>
<TD WIDTH="25%" BGCOLOR="#00C000" ALIGN="center">
<A HREF="index.html">
<FONT COLOR="#FFFFFF" SIZE="3">
<B>Up</B>
</FONT>
</A>
</TD>
<TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right">
<A HREF="ltt-decoder-commandline.html">
<FONT COLOR="#FFFFFF"SIZE="3">
<B>Next Page &#62;&#62;&#62;</B>
</FONT>
</A>
</TD>
</TR>
</TABLE>
<br>
<font size=6>
<u><b>4. Trace daemon command-line operation</b></u>
</font>
<p><b>NAME</b>
<p>&nbsp;&nbsp;&nbsp; tracedaemon - The trace daemon component of the
Linux Trace Toolkit (LTT)
<p><b>SYNOPSIS</b>
<p>&nbsp;&nbsp;&nbsp; tracedaemon&nbsp; 
[ -d ] 
[ -b<u>BufSize</u> ]
[ -e<u>EventTypes</u> ]
[ -D<u>EventTypes</u> ]
[ -c<u>CPU-ID</u> ]
[ -p<u>PID</u> ]
[ -G<u>PGRP</u> ]
[ -g<u>GID</u> ]
[ -u<u>UID</u> ]
[ -s { d<u>CallDepth</u> | l<u>LowerBound</u> | u<u>UpperBound</u> } ]
[ -t { s<u>Seconds</u> | u<u>Microseconds</u> } ]
[ <u>TraceDevice</u> ] 
[ <u>TraceFile</u> ]
[ <u>ProcFile</u> ]

<p><b>DESCRIPTION</b>
<p>&nbsp;&nbsp;&nbsp; 
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.

<p>&nbsp;&nbsp;&nbsp; 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!

<p><b>OPTIONS</b>

<p>&nbsp;&nbsp;&nbsp; <b>-d</b>&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp; <b>-b</b>&nbsp;&nbsp;&nbsp; Sets the trace module's
data collection buffer to the size given by <u>BufSize</u>. 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.

<p>&nbsp;&nbsp;&nbsp; <b>-e</b>&nbsp;&nbsp;&nbsp; Trace only the given events.
This will set the trace mask passed to the module to include the event given
in <u>EventTypes</u>. 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:
<ul>
<ul>
<li>
"START" - Trace start</li>

<li>
"SYS_ENTRY" - System call entry</li>

<li>
"SYS_EXIT" - System call exit</li>

<li>
"TRAP_ENTRY" - Trap entry</li>

<li>
"TRAP_EXIT" - Trap exit</li>

<li>
"IRQ_ENTRY" - Interrupt entry </li>

<li>
"IRQ_EXIT" - Interrupt exit </li>

<li>
"SCHED" - Schedule change</li>

<li>
"KTIMER" - Kernel timer</li>

<li>
"SIRQ" - Soft IRQ management</li>

<li>
"PROCESS" - Process management</li>

<li>
"FS" - File system management</li>

<li>
"TIMER" - Timer management</li>

<li>
"MEM" - Memory management</li>

<li>
"SOCKET" - Socket communications</li>

<li>
"IPC" - System V IPC communications</li>

<li>
"NET" - Network device management</li>

<li>
"NEWEV" - Creation of new event types</li>

<li>
"CSTM" - Custom event occurrences</li>
</ul>
</ul>

If you've compile the trace daemon with RTAI support, then the following event types can be configured:
<ul>
<ul>
<li>
"RTMNT" - RTAI mount</li>

<li>
"RTUMNT" - RTAI unmount </li>

<li>
"RTGIRQE" - RTAI global IRQ entry</li>

<li>
"RTGIRQX" - RTAI global IRQ exit</li>

<li>
"RTOIRQE" - RTAI CPU own IRQ entry </li>

<li>
"RTOIRQX" - RTAI CPU own IRQ exit </li>

<li>
"RTTRAPE" - RTAI trap entry</li>

<li>
"RTTRAPX" - RTAI trap exit</li>

<li>
"RTSRQE" - RTAI SRQ entry</li>

<li>
"RTSRQX" - RTAI SRQ exit</li>

<li>
"RTSWTCHL" - RTAI switch to Linux</li>

<li>
"RTSWTCHR" - RTAI switch to RT</li>

<li>
"RTSCHED" - RTAI scheduling change</li>

<li>
"RTTASK" - RTAI task management</li>

<li>
"RTTIMER" - RTAI timer management</li>

<li>
"RTSEM" - RTAI semaphore communications</li>

<li>
"RTMSG" - RTAI message communications</li>

<li>
"RTRPC" - RTAI RPC communications</li>

<li>
"RTMBX" - RTAI message box communications</li>

<li>
"RTFIFO" - RTAI FIFO communications</li>

<li>
"RTSHM" - RTAI shared memory management</li>

<li>
"RTPOSIX" - RTAI Posix layer</li>

<li>
"RTLXRT" - RTAI LXRT layer</li>

<li>
"RTLXRTI" - RTAI LXRT-informed layer</li>

</ul>
</ul>


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.

<p>&nbsp;&nbsp;&nbsp; <b>-D</b>&nbsp;&nbsp;&nbsp; Sets the module to record the
details of the event given. See <b>-e</b> 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 <b>-e</b> 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.

<p>&nbsp;&nbsp;&nbsp; <b>-c</b>&nbsp;&nbsp;&nbsp; Trace CPU-ID. Only include
events that occurred on <u>CPU-ID</u> in trace.

<p>&nbsp;&nbsp;&nbsp; <b>-p</b>&nbsp;&nbsp;&nbsp; Trace PID. Only include
process number <u>PID</u> in trace.

<p>&nbsp;&nbsp;&nbsp; <b>-G</b>&nbsp;&nbsp;&nbsp; Trace process group. Only include
processes part of <u>PGRP</u> in trace.

<p>&nbsp;&nbsp;&nbsp; <b>-g</b>&nbsp;&nbsp;&nbsp; Trace GID. Only include
processes part of <u>GID</u> in trace.

<p>&nbsp;&nbsp;&nbsp; <b>-u</b>&nbsp;&nbsp;&nbsp; Trace UID. Only include
processes belonging to <u>UID</u> in trace.

<p>&nbsp;&nbsp;&nbsp; <b>-s</b>&nbsp;&nbsp;&nbsp; Set the syscall EIP fetching
policy. If <b>-sd</b> is used then the instruction pointer (EIP) will be fetched
up the call stack at the given <u>CallDepth</u>. If the EIP has to be fetched
from a certain range then <b>-su</b> and <b>-sl</b> must be used in this sequence.
Each must be followed by a hexadecimal formatted address, 0xXXXXXXXX. These will
be the <u>UpperBound</u> and the <u>LowerBound</u> used to fetch the EIP.

<p>&nbsp;&nbsp;&nbsp; <b>-t</b>&nbsp;&nbsp;&nbsp; Set the time for which the
daemon should run. <b>-ts</b> sets the number of seconds to run to <u>Seconds</u>.
<b>-tu</b> sets the number of microseconds to run to <u>Microseconds</u>.

<hr WIDTH="100%">
<TABLE WIDTH="100%" BORDER="0" BGCOLOR="#000000" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="left">
<A HREF="ltt-dataacquisition.html">
<FONT COLOR="#FFFFFF" SIZE="3">
<B>&#60;&#60;&#60; Previous Page</B>
</FONT>
</A>
</TD>
<TD WIDTH="25%" BGCOLOR="#0000C0" ALIGN="center">
<A HREF="index.html">
<FONT COLOR="#FFFFFF" SIZE="3">
<B>Home</B>
</FONT>
</A>
</TD>
<TD WIDTH="25%" BGCOLOR="#00C000" ALIGN="center">
<A HREF="index.html">
<FONT COLOR="#FFFFFF" SIZE="3">
<B>Up</B>
</FONT>
</A>
</TD>
<TD WIDTH="25%" BGCOLOR="#C00000" ALIGN="right">
<A HREF="ltt-decoder-commandline.html">
<FONT COLOR="#FFFFFF" SIZE="3">
<B>Next Page &#62;&#62;&#62;</B>
</FONT>
</A>
</TD>
</TR>
<TR>
<TD COLSPAN="2" ALIGN="left">
<FONT COLOR="#FFFFFF" SIZE="3">
<B>Linux trace toolkit</B>
</FONT>
</TD>
<TD COLSPAN="2" ALIGN="right">
<FONT COLOR="#FFFFFF" SIZE="3">
<B>Daemon command-line operation</B>
</FONT>
</TD>
</TR>
</TABLE>
</body>
</html>