Manpage: cleanup layout of calibrate
[lttng-tools.git] / doc / man / lttng.1
CommitLineData
391b9c72 1.TH "LTTNG" "1" "December 3rd, 2012" "" ""
6991b181
DG
2
3.SH "NAME"
c5db699c 4lttng \(em LTTng 2.x tracer control command line tool
6991b181
DG
5
6.SH "SYNOPSIS"
7
8.PP
9.nf
10lttng [OPTIONS] <COMMAND>
11.fi
12.SH "DESCRIPTION"
13
14.PP
15The LTTng project aims at providing highly efficient tracing tools for Linux.
16It's tracers help tracking down performance issues and debugging problems
17involving multiple concurrent processes and threads. Tracing across multiple
18systems is also possible.
19
fa072eae 20The \fBlttng\fP command line tool from the lttng-tools package is used to control
6991b181
DG
21both kernel and user-space tracing. Every interactions with the tracer should
22be done by this tool or by the liblttng-ctl provided with the lttng-tools
23package.
24
25LTTng uses a session daemon (lttng-sessiond(8)), acting as a tracing registry,
50a3b92a 26which allows you to interact with multiple tracers (kernel and user-space)
6991b181
DG
27inside the same container, a tracing session. Traces can be gathered from the
28kernel and/or instrumented applications (lttng-ust(3)). Aggregating and reading
29those traces is done using the babeltrace(1) text viewer.
30
50a3b92a
DG
31We introduce the notion of \fBtracing domains\fP which is essentially a type of
32tracer (kernel or user space for now). In the future, we could see a third
33tracer being for instance an hypervisor. For some commands, you'll need to
34specify on which domain the command applies (-u or -k). For instance, enabling
35a kernel event, you must specify the kernel domain to the command so we know
36for which tracer this event is for.
37
6991b181
DG
38In order to trace the kernel, the session daemon needs to be running as root.
39LTTng provides the use of a \fBtracing group\fP (default: tracing). Whomever is
40in that group can interact with the root session daemon and thus trace the
41kernel. Session daemons can co-exist meaning that you can have a session daemon
fa072eae
YB
42running as Alice that can be used to trace her applications along side with a
43root daemon or even a Bob daemon. We highly recommend to start the session
6991b181
DG
44daemon at boot time for stable and long term tracing.
45
46Every user-space applications instrumented with lttng-ust(3), will
47automatically register to the session daemon. This feature gives you the
48ability to list available traceable applications and tracepoints on a per user
49basis. (See \fBlist\fP command).
50.SH "OPTIONS"
51
52.PP
53This program follow the usual GNU command line syntax with long options starting with
54two dashes. Below is a summary of the available options.
55.PP
56
57.TP
c9e32613 58.BR "\-h, \-\-help"
6991b181
DG
59Show summary of possible options and commands.
60.TP
c9e32613 61.BR "\-v, \-\-verbose"
6991b181 62Increase verbosity.
d829b38c 63Three levels of verbosity are available which are triggered by putting additional v to
fa072eae 64the option (\-vv or \-vvv)
6991b181 65.TP
c9e32613 66.BR "\-q, \-\-quiet"
6991b181
DG
67Suppress all messages (even errors).
68.TP
c9e32613 69.BR "\-g, \-\-group NAME"
6991b181
DG
70Set unix tracing group name. (default: tracing)
71.TP
c9e32613 72.BR "\-n, \-\-no-sessiond"
6991b181
DG
73Don't automatically spawn a session daemon.
74.TP
391b9c72 75.BR "\-\-sessiond\-path PATH"
6991b181
DG
76Set session daemon full binary path.
77.TP
c9e32613 78.BR "\-\-list\-options"
6991b181
DG
79Simple listing of lttng options.
80.TP
c9e32613 81.BR "\-\-list\-commands"
6991b181
DG
82Simple listing of lttng commands.
83.SH "COMMANDS"
84
812a5eb7 85.PP
6991b181 86\fBadd-context\fP
812a5eb7 87.RS
6991b181
DG
88Add context to event(s) and/or channel(s).
89
391b9c72
DG
90A context is basically extra information appended to a channel. For instance,
91you could ask the tracer to add the PID information for all events in a
92channel. You can also add performance monitoring unit counters (perf PMU) using
93the perf kernel API).
6991b181
DG
94
95For example, this command will add the context information 'prio' and two perf
96counters (hardware branch misses and cache misses), to all events in the trace
97data output:
98
812a5eb7
MD
99.nf
100# lttng add-context \-k \-t prio \-t perf:branch-misses \\
101 \-t perf:cache-misses
102.fi
6991b181 103
c9e32613 104Please take a look at the help (\-h/\-\-help) for a detailed list of available
6991b181
DG
105contexts.
106
bd337b98
DG
107If no channel is given (\-c), the context is added to all channels that were
108already enabled. If the session has no channel, a default channel is created.
109Otherwise the context will be added only to the given channel (\-c).
6991b181 110
c9e32613 111If \fB\-s, \-\-session\fP is omitted, the session name is taken from the .lttngrc
6991b181 112file.
6991b181
DG
113
114.B OPTIONS:
115
812a5eb7
MD
116.TP
117.BR "\-h, \-\-help"
118Show summary of possible options and commands.
119.TP
120.BR "\-s, \-\-session NAME"
121Apply on session name.
122.TP
123.BR "\-c, \-\-channel NAME"
124Apply on channel name.
125.TP
126.BR "\-k, \-\-kernel"
127Apply for the kernel tracer
128.TP
129.BR "\-u, \-\-userspace"
130Apply for the user-space tracer
131.TP
132.BR "\-t, \-\-type TYPE"
133Context type. You can repeat this option on the command line. Please
134use "lttng add-context \-h" to list all available types.
135.RE
136.PP
6991b181 137
22019883
MD
138.PP
139\fBcalibrate\fP [OPTIONS]
140.RS
6991b181
DG
141Quantify LTTng overhead
142
143The LTTng calibrate command can be used to find out the combined average
144overhead of the LTTng tracer and the instrumentation mechanisms used. This
145overhead can be calibrated in terms of time or using any of the PMU performance
146counter available on the system.
147
148For now, the only calibration implemented is that of the kernel function
149instrumentation (kretprobes).
150
151* Calibrate kernel function instrumentation
152
153Let's use an example to show this calibration. We use an i7 processor with 4
154general-purpose PMU registers. This information is available by issuing dmesg,
155looking for "generic registers".
156
157This sequence of commands will gather a trace executing a kretprobe hooked on
158an empty function, gathering PMU counters LLC (Last Level Cache) misses
c9e32613 159information (see lttng add-context \-\-help to see the list of available PMU
6991b181
DG
160counters).
161
22019883 162.nf
6991b181 163# lttng create calibrate-function
22019883
MD
164# lttng enable-event calibrate \-\-kernel \\
165 \-\-function lttng_calibrate_kretprobe
166# lttng add-context \-\-kernel \-t perf:LLC-load-misses \\
167 \-t perf:LLC-store-misses \\
168 \-t perf:LLC-prefetch-misses
6991b181
DG
169# lttng start
170# for a in $(seq 1 10); do \\
c9e32613 171 lttng calibrate \-\-kernel \-\-function;
6991b181
DG
172 done
173# lttng destroy
22019883
MD
174# babeltrace $(ls \-1drt ~/lttng-traces/calibrate-function-* \\
175 | tail \-n 1)
176.fi
6991b181
DG
177
178The output from babeltrace can be saved to a text file and opened in a
179spreadsheet (e.g. oocalc) to focus on the per-PMU counter delta between
180consecutive "calibrate_entry" and "calibrate_return" events. Note that these
181counters are per-CPU, so scheduling events would need to be present to account
182for migration between CPU. Therefore, for calibration purposes, only events
183staying on the same CPU must be considered.
184
185The average result, for the i7, on 10 samples:
186
22019883 187.nf
6991b181
DG
188 Average Std.Dev.
189perf_LLC_load_misses: 5.0 0.577
190perf_LLC_store_misses: 1.6 0.516
191perf_LLC_prefetch_misses: 9.0 14.742
22019883 192.fi
6991b181
DG
193
194As we can notice, the load and store misses are relatively stable across runs
195(their standard deviation is relatively low) compared to the prefetch misses.
196We can conclude from this information that LLC load and store misses can be
197accounted for quite precisely, but prefetches within a function seems to behave
198too erratically (not much causality link between the code executed and the CPU
199prefetch activity) to be accounted for.
6991b181
DG
200
201.B OPTIONS:
202
22019883
MD
203.TP
204.BR "\-h, \-\-help"
205Show summary of possible options and commands.
206.TP
207.BR "\-k, \-\-kernel"
208Apply for the kernel tracer
209.TP
210.BR "\-u, \-\-userspace"
211Apply for the user-space tracer
212.TP
213.BR "\-\-function"
214Dynamic function entry/return probe (default)
215.RE
216.PP
6991b181 217
6b8f2e64 218.IP "\fBcreate\fP [NAME] [OPTIONS]
6991b181
DG
219.nf
220Create tracing session.
221
222A tracing session contains channel(s) which contains event(s). It is domain
223agnostic meaning that you can enable channels and events for either the
224user-space tracer and/or the kernel tracer. It acts like a container
225aggregating multiple tracing sources.
226
227On creation, a \fB.lttngrc\fP file is created in your $HOME directory
228containing the current session name. If NAME is omitted, a session name is
fa072eae 229automatically created having this form: 'auto-yyyymmdd-hhmmss'.
6991b181 230
c9e32613 231If no \fB\-o, \-\-output\fP is specified, the traces will be written in
6991b181 232$HOME/lttng-traces.
feb0f3e5
AM
233
234The $HOME environment variable can be overridden by defining the environment
235variable LTTNG_HOME. This is useful when the user running the commands has
236a non-writeable home directory.
6991b181
DG
237.fi
238
239.B OPTIONS:
240
241.nf
c9e32613 242\-h, \-\-help
6991b181 243 Show summary of possible options and commands.
c9e32613 244\-\-list-options
6991b181 245 Simple listing of options
c9e32613 246\-o, \-\-output PATH
6991b181 247 Specify output path for traces
5dfe3327
MD
248\-\-no-output
249 Traces will not be outputed
250\-\-snapshot
251 Set the session in snapshot mode. Created in no-output mode
252 and uses the URL, if one, as the default snapshot output.
253 Every channel will be set in overwrite mode and with mmap
254 output (splice not supported).
6b8f2e64
DG
255
256Using these options, each API call can be controlled individually. For
257instance, \-C does not enable the consumer automatically. You'll need the \-e
258option for that.
259
23d14dff 260\-U, \-\-set-url=URL
785d2d0d 261 Set URL for the consumer output destination. It is persistent for the
6b8f2e64
DG
262 session lifetime. Redo the command to change it. This will set both
263 data and control URL for network.
264\-C, \-\-ctrl-url=URL
265 Set control path URL. (Must use -D also)
266\-D, \-\-data-url=URL
267 Set data path URL. (Must use -C also)
6b8f2e64 268
785d2d0d
DG
269.B URL FORMAT:
270
271proto://[HOST|IP][:PORT1[:PORT2]][/TRACE_PATH]
272
273Supported protocols are (proto):
274> file://...
275 Local filesystem full path.
276
277> net://...
278 This will use the default network transport layer which is TCP for both
279 control (PORT1) and data port (PORT2). The default ports are
280 respectively 5342 and 5343. Note that net[6]:// is not yet supported.
281
282> tcp[6]://...
283 Can only be used with -C and -D together
284
285NOTE: IPv6 address MUST be enclosed in brackets '[]' (rfc2732)
6b8f2e64
DG
286
287.B EXAMPLES:
288
289# lttng create -U net://192.168.1.42
290Uses TCP and default ports for the given destination.
291
292# lttng create -U net6://[fe80::f66d:4ff:fe53:d220]
293Uses TCP, default ports and IPv6.
294
295# lttng create s1 -U net://myhost.com:3229
296Create session s1 and set its consumer to myhost.com on port 3229 for control.
6991b181
DG
297.fi
298
299.IP
300
301.IP "\fBdestroy\fP [OPTIONS] [NAME]"
302.nf
303Teardown tracing session
304
305Free memory on the session daemon and tracer side. It's gone!
306
307If NAME is omitted, the session name is taken from the .lttngrc file.
308.fi
309
310.B OPTIONS:
311
312.nf
c9e32613 313\-h, \-\-help
6991b181 314 Show summary of possible options and commands.
a3c5b534
FG
315\-a, \-\-all
316 Destroy all sessions
c9e32613 317\-\-list-options
6991b181
DG
318 Simple listing of options
319.fi
320
321.IP
322
323.IP "\fBenable-channel\fP NAME[,NAME2,...] [-k|-u] [OPTIONS]"
324.nf
325Enable tracing channel
326
004f3466
DG
327To enable an event, you must enable both the event and the channel that
328contains it.
b883c01b 329
c9e32613 330If \fB\-s, \-\-session\fP is omitted, the session name is taken from the .lttngrc
6991b181 331file.
7972aab2
DG
332
333It is important to note that if a certain type of buffers is used, the session
bd337b98 334will be set with that type and all other subsequent channel needs to have the
7972aab2 335same type.
bd337b98 336
d2f11c4a
DG
337Note that once the session has been started and enabled on the tracer side,
338it's not possible anymore to enable a new channel for that session.
6991b181
DG
339.fi
340
341.B OPTIONS:
342
343.nf
c9e32613 344\-h, \-\-help
6991b181 345 Show this help
c9e32613 346\-\-list-options
6991b181 347 Simple listing of options
391b9c72 348\-s, \-\-session NAME
6991b181 349 Apply on session name
c9e32613 350\-k, \-\-kernel
6991b181 351 Apply to the kernel tracer
c9e32613 352\-u, \-\-userspace
6991b181
DG
353 Apply to the user-space tracer
354
c9e32613 355\-\-discard
6991b181 356 Discard event when subbuffers are full (default)
c9e32613 357\-\-overwrite
6991b181 358 Flight recorder mode : overwrites events when subbuffers are full
391b9c72 359\-\-subbuf-size SIZE
0a9c6494
DG
360 Subbuffer size in bytes {+k,+M,+G}
361 (default UST uid: 131072, UST pid: 4096, kernel: 262144, metadata: 4096)
1cb514ce 362 Rounded up to the next power of 2.
bd337b98
DG
363
364 The minimum subbuffer size, for each tracer, is the max value between
365 the default above and the system page size. You can issue this command
366 to get the current page size on your system: \fB$ getconf PAGE_SIZE\fP
391b9c72 367\-\-num-subbuf NUM
0a9c6494 368 Number of subbuffers. (default UST uid: 4, UST pid: 4, kernel: 4, metadata: 2)
1cb514ce 369 Rounded up to the next power of 2.
391b9c72 370\-\-switch-timer USEC
0a9c6494
DG
371 Switch subbuffer timer interval in ┬Ásec.
372 (default UST uid: 0, UST pid: 0, kernel: 0, metadata: 0)
391b9c72 373\-\-read-timer USEC
0a9c6494
DG
374 Read timer interval in ┬Ásec.
375 (default UST uid: 0, UST pid: 0, kernel: 200000, metadata: 0)
391b9c72
DG
376\-\-output TYPE
377 Channel output type. Possible values: mmap, splice
0a9c6494 378 (default UST uid: mmap, UST pid: mmap, kernel: splice, metadata: mmap)
7972aab2
DG
379\-\-buffers-uid
380 Use per UID buffer (\-u only). Buffers are shared between applications
381 that have the same UID.
382\-\-buffers-pid
383 Use per PID buffer (\-u only). Each application has its own buffers.
384\-\-buffers-global
385 Use shared buffer for the whole system (\-k only)
1624d5b7 386\-C, \-\-tracefile-size SIZE
e132a0d4 387 Maximum size of each tracefile within a stream (in bytes).
0a9c6494 388 0 means unlimited. (default: 0)
1624d5b7
JD
389\-W, \-\-tracefile-count COUNT
390 Used in conjunction with \-C option, this will limit the number
0a9c6494 391 of files created to the specified count. 0 means unlimited. (default: 0)
1624d5b7
JD
392
393.B EXAMPLES:
394
395$ lttng enable-channel -C 4096 -W 32 chan1
cea28771
DG
396For each stream, the maximum size of each trace file will be 4096 bytes, and
397there will be a maximum of 32 different files. The file count is appended after
1624d5b7
JD
398the stream number as seen in the following example. The last trace file is
399smaller than 4096 since it was not completely filled.
400
401 ~/lttng-traces/[...]/chan1_0_0 (4096)
402 ~/lttng-traces/[...]/chan1_0_1 (4096)
403 ~/lttng-traces/[...]/chan1_0_2 (3245)
404 ~/lttng-traces/[...]/chan1_1_0 (4096)
405 ...
406
407$ lttng enable-channel -C 4096
408This will create trace files of 4096 bytes and will create new ones as long as
409there is data available.
6991b181
DG
410.fi
411
412.IP
413
414.IP "\fBenable-event\fP NAME[,NAME2,...] [-k|-u] [OPTIONS]"
415.nf
416Enable tracing event
417
c9e32613 418A tracing event is always assigned to a channel. If \fB\-c, \-\-channel\fP is
6991b181 419omitted, a default channel named '\fBchannel0\fP' is created and the event is
c9e32613 420added to it. For the user-space tracer, using \fB\-a, \-\-all\fP is the same as
6991b181
DG
421using the wildcard "*".
422
c9e32613 423If \fB\-s, \-\-session\fP is omitted, the session name is taken from the .lttngrc
6991b181
DG
424file.
425.fi
426
427.B OPTIONS:
428
429.nf
c9e32613 430\-h, \-\-help
6991b181 431 Show summary of possible options and commands.
c9e32613 432\-\-list-options
6991b181 433 Simple listing of options
391b9c72 434\-s, \-\-session NAME
6991b181 435 Apply on session name
391b9c72 436\-c, \-\-channel NAME
6991b181 437 Apply on channel name
c9e32613 438\-a, \-\-all
c5650942
DG
439 Enable all tracepoints and syscalls. This actually enable a single
440 wildcard event "*".
c9e32613 441\-k, \-\-kernel
6991b181 442 Apply for the kernel tracer
c9e32613 443\-u, \-\-userspace
6991b181
DG
444 Apply for the user-space tracer
445
c9e32613 446\-\-tracepoint
6991b181
DG
447 Tracepoint event (default)
448 - userspace tracer supports wildcards at end of string. Don't forget to
449 quote to deal with bash expansion.
450 e.g.:
451 "*"
452 "app_component:na*"
391b9c72
DG
453\-\-loglevel NAME
454 Tracepoint loglevel range from 0 to loglevel. Listed in the help (\-h).
455\-\-loglevel-only NAME
456 Tracepoint loglevel (only this loglevel).
457
458 The loglevel or loglevel-only options should be combined with a
459 tracepoint name or tracepoint wildcard.
c9e32613 460\-\-probe [addr | symbol | symbol+offset]
6991b181
DG
461 Dynamic probe. Addr and offset can be octal (0NNN...), decimal (NNN...)
462 or hexadecimal (0xNNN...)
c9e32613 463\-\-function [addr | symbol | symbol+offset]
6991b181
DG
464 Dynamic function entry/return probe. Addr and offset can be octal
465 (0NNN...), decimal (NNN...) or hexadecimal (0xNNN...)
c9e32613 466\-\-syscall
6b8f2e64
DG
467 System call event. Enabling syscalls tracing (kernel tracer), you will
468 not be able to disable them with disable-event. This is a known
469 limitation. You can disable the entire channel to do the trick.
9bd578f5 470
919e300c 471\-\-filter 'expression'
6b8f2e64 472 Set a filter on a newly enabled event. Filter expression on event
ee8ccafa
MD
473 fields and context. Event recording depends on evaluation. Only
474 specify on first activation of a given event within a session.
475 Filter only allowed when enabling events within a session before
476 tracing is started. If the filter fails to link with the event
477 within the traced domain, the event will be discarded.
478 Currently, filter is only implemented for the user-space tracer.
6b8f2e64
DG
479
480 Expression examples:
481
482 'intfield > 500 && intfield < 503'
483 '(stringfield == "test" || intfield != 10) && intfield > 33'
484 'doublefield > 1.1 && intfield < 5.3'
485
486 Wildcards are allowed at the end of strings:
487 'seqfield1 == "te*"'
488 In string literals, the escape character is a '\\'. Use '\\*' for
ee8ccafa
MD
489 the '*' character, and '\\\\' for the '\\' character. Wildcard
490 match any sequence of characters, including an empty sub-string
491 (match 0 or more characters).
492
493 Context information can be used for filtering. The examples
494 below show usage of context filtering on process name (with a
495 wildcard), process ID range, and unique thread ID for filtering.
496 The process and thread ID of running applications can be found
497 under columns "PID" and "LWP" of the "ps -eLf" command.
498
499 '$ctx.procname == "demo*"'
500 '$ctx.vpid >= 4433 && $ctx.vpid < 4455'
501 '$ctx.vtid == 1234'
6991b181
DG
502.fi
503
c9e32613 504.IP "\fBdisable-channel\fP NAME[,NAME2,...] [\-k|\-u] [OPTIONS]"
6991b181
DG
505.nf
506Disable tracing channel
507
508Disabling a channel makes all event(s) in that channel to stop tracing. You can
509enable it back by calling \fBlttng enable-channel NAME\fP again.
510
c9e32613 511If \fB\-s, \-\-session\fP is omitted, the session name is taken from the .lttngrc
6991b181
DG
512file.
513.fi
514
515.B OPTIONS:
516
6b8f2e64
DG
517.nf
518\-h, \-\-help
519 Show summary of possible options and commands.
520\-\-list-options
521 Simple listing of options
522\-s, \-\-session NAME
6991b181 523 Apply on session name
c9e32613 524\-k, \-\-kernel
6991b181 525 Apply for the kernel tracer
c9e32613 526\-u, \-\-userspace
6991b181
DG
527 Apply for the user-space tracer
528.fi
529
c9e32613 530.IP "\fBdisable-event\fP NAME[,NAME2,...] [\-k|\-u] [OPTIONS]"
6991b181
DG
531.nf
532Disable tracing event
533
534The event, once disabled, can be re-enabled by calling \fBlttng enable-event
535NAME\fP again.
536
c9e32613 537If \fB\-s, \-\-session\fP is omitted, the session name is taken from the .lttngrc
6991b181
DG
538file.
539.fi
540
541.B OPTIONS:
542
543.nf
c9e32613 544\-h, \-\-help
6991b181 545 Show summary of possible options and commands.
c9e32613 546\-\-list-options
6991b181 547 Simple listing of options
391b9c72 548\-s, \-\-session NAME
6991b181 549 Apply on session name
c5650942
DG
550\-a, \-\-all-events
551 Disable all events. This does NOT disable "*" but rather
552 every known events of the session.
c9e32613 553\-k, \-\-kernel
6991b181 554 Apply for the kernel tracer
c9e32613 555\-u, \-\-userspace
6991b181
DG
556 Apply for the user-space tracer
557.fi
558
c9e32613 559.IP "\fBlist\fP [\-k|\-u] [SESSION [SESSION_OPTIONS]]"
6991b181 560.nf
c9e32613 561List tracing session information.
6991b181
DG
562
563With no arguments, it will list available tracing session(s).
564
fa072eae
YB
565With the session name, it will display the details of the session including
566the trace file path, the associated channels and their state (activated
d829b38c 567and deactivated), the activated events and more.
fa072eae 568
c9e32613 569With \-k alone, it will list all available kernel events (except the system
6991b181 570calls events).
c9e32613
DG
571With \-u alone, it will list all available user-space events from registered
572applications. Here is an example of 'lttng list \-u':
6991b181
DG
573
574PID: 7448 - Name: /tmp/lttng-ust/tests/hello/.libs/lt-hello
575 ust_tests_hello:tptest_sighandler (type: tracepoint)
576 ust_tests_hello:tptest (type: tracepoint)
577
578You can now enable any event listed by using the name :
579\fBust_tests_hello:tptest\fP.
580.fi
581
582.B OPTIONS:
583
584.nf
c9e32613 585\-h, \-\-help
6991b181 586 Show summary of possible options and commands.
c9e32613 587\-\-list-options
6991b181 588 Simple listing of options
c9e32613 589\-k, \-\-kernel
d829b38c 590 Select kernel domain
c9e32613 591\-u, \-\-userspace
6991b181
DG
592 Select user-space domain.
593
6b8f2e64
DG
594.B SESSION OPTIONS:
595
c9e32613 596\-c, \-\-channel NAME
6991b181 597 List details of a channel
c9e32613 598\-d, \-\-domain
6991b181
DG
599 List available domain(s)
600.fi
601
602.IP "\fBset-session\fP NAME"
603.nf
604Set current session name
605
606Will change the session name in the .lttngrc file.
607.fi
608
609.B OPTIONS:
610
611.nf
c9e32613 612\-h, \-\-help
6991b181 613 Show summary of possible options and commands.
c9e32613 614\-\-list-options
6991b181
DG
615 Simple listing of options
616.fi
617
618.IP
619
b872baea
DG
620.IP "\fBsnapshot\fP ACTION"
621.nf
622Snapshot command for LTTng session.
623.fi
624
625.B OPTIONS:
626
627.nf
628\-h, \-\-help
629 Show summary of possible options and commands.
630\-\-list-options
631 Simple listing of options
632.fi
633
634.B ACTION:
635
636.nf
637\fBadd-output\fP [-m <SIZE>] [-s <NAME>] [-n <NAME>] <URL> | -C <URL> -D <URL>
638
639Setup and add an snapshot output for a session. Output are the destination
640where the snapshot will be sent. Only one output is permitted. To change it,
641you'll need to delete it and add back the new one.
642
643\fBdel-output\fP ID | NAME [-s <NAME>]
644
645Delete an output for a session using the ID. You can either specify the
646output's ID that can be found with list-output or the name.
647
648\fBlist-output\fP [-s <NAME>]
649
650List the output of a session. Attributes of the output are printed.
651
652\fBrecord\fP [-m <SIZE>] [-s <NAME>] [-n <NAME>] [<URL> | -C <URL> -D <URL>]
653
654Snapshot a session's buffer(s) for all domains. If an URL is specified, it is
655used instead of a previously added output. Specifying only a name or/and a max
656size will override the current output values. For instance, you can record a
657snapshot with a custom maximum size or with a different name.
658
659$ lttng add-output -n mysnapshot file:///data/snapshot
660[...]
661$ lttng snapshot record -n new_name_snapshot
662
663The above will create a snapshot in /data/snapshot/new_name_snapshot* directory
664rather then in mysnapshot*/
665.fi
666
667.B LONG OPTIONS
668
669.nf
3ae6f666
DG
670\-s, \-\-session NAME
671 Apply to session name.
672\-n, \-\-name NAME
673 Name of the snapshot's output.
674\-m, \-\-max-size SIZE
675 Maximum size in bytes of the snapshot. The maxium size does not
676 include the metadata file.
677\-C, \-\-ctrl-url URL
678 Set control path URL. (Must use -D also)
679\-D, \-\-data-url URL
680 Set data path URL. (Must use -C also)
b872baea
DG
681.fi
682
683.IP
684
6b8f2e64 685.IP "\fBstart\fP [NAME] [OPTIONS]"
6991b181
DG
686.nf
687Start tracing
688
689It will start tracing for all tracers for a specific tracing session.
690
691If NAME is omitted, the session name is taken from the .lttngrc file.
692.fi
693
694.B OPTIONS:
695
696.nf
c9e32613 697\-h, \-\-help
6991b181 698 Show summary of possible options and commands.
c9e32613 699\-\-list-options
6991b181
DG
700 Simple listing of options
701.fi
702
703.IP
704
6b8f2e64 705.IP "\fBstop\fP [NAME] [OPTIONS]"
6991b181
DG
706.nf
707Stop tracing
708
391b9c72
DG
709It will stop tracing for all tracers for a specific tracing session. Before
710returning, the command checks for data availability meaning that it will wait
711until the trace is readable for the session. Use \-\-no-wait to avoid this
712behavior.
6991b181
DG
713
714If NAME is omitted, the session name is taken from the .lttngrc file.
715.fi
716
717.B OPTIONS:
718
719.nf
c9e32613 720\-h, \-\-help
6991b181 721 Show summary of possible options and commands.
c9e32613 722\-\-list-options
6991b181 723 Simple listing of options
391b9c72
DG
724\-\-no-wait
725 Don't wait for data availability.
6991b181
DG
726.fi
727
728.IP
729
730.IP "\fBversion\fP"
731.nf
732Show version information
733.fi
734
735.B OPTIONS:
736
737.nf
c9e32613 738\-h, \-\-help
6991b181 739 Show summary of possible options and commands.
c9e32613 740\-\-list-options
6991b181
DG
741 Simple listing of options
742.fi
743
744.IP
745
746.IP "\fBview\fP [SESSION_NAME] [OPTIONS]"
747.nf
748View traces of a tracing session
749
750By default, the babeltrace viewer will be used for text viewing.
751
fa072eae
YB
752If SESSION_NAME is omitted, the session name is taken from the .lttngrc file.
753
6991b181
DG
754.fi
755
756.B OPTIONS:
757
758.nf
c9e32613 759\-h, \-\-help
6991b181 760 Show this help
c9e32613 761\-\-list-options
6991b181 762 Simple listing of options
c9e32613 763\-t, \-\-trace-path PATH
6991b181 764 Trace directory path for the viewer
c9e32613 765\-e, \-\-viewer CMD
6991b181
DG
766 Specify viewer and/or options to use
767 This will completely override the default viewers so
768 please make sure to specify the full command. The trace
769 directory path of the session will be appended at the end
770 to the arguments
771.fi
772
c206d957 773.SH "EXIT VALUES"
6b8f2e64
DG
774On success 0 is returned and a positive value on error. Value of 1 means a command
775error, 2 an undefined command, 3 a fatal error and 4 a command warning meaning that
776something went wrong during the command.
c206d957 777
6b8f2e64
DG
778Any other value above 10, please refer to
779.BR <lttng/lttng-error.h>
780for a detailed list or use lttng_strerror() to get a human readable string of
781the error code.
c206d957 782
c206d957 783.PP
6991b181
DG
784.SH "ENVIRONMENT VARIABLES"
785
786.PP
787Note that all command line options override environment variables.
788.PP
789
790.PP
05833633 791.IP "LTTNG_SESSIOND_PATH"
c9e32613
DG
792Allows one to specify the full session daemon binary path to lttng command line
793tool. You can also use \-\-sessiond-path option having the same effect.
6991b181 794.SH "SEE ALSO"
6b8f2e64
DG
795.BR babeltrace(1),
796.BR lttng-ust(3),
797.BR lttng-sessiond(8),
798.BR lttng-relayd(8),
799.BR lttng-health-check(3)
6991b181
DG
800.SH "BUGS"
801
6991b181 802If you encounter any issues or usability problem, please report it on our
6b8f2e64
DG
803mailing list <lttng-dev@lists.lttng.org> to help improve this project or
804at https://bugs.lttng.org which is a bugtracker.
6991b181
DG
805.SH "CREDITS"
806
807.PP
c9e32613 808lttng is distributed under the GNU General Public License version 2. See the file
6991b181
DG
809COPYING for details.
810.PP
811A Web site is available at http://lttng.org for more information on the LTTng
812project.
813.PP
814You can also find our git tree at http://git.lttng.org.
815.PP
816Mailing lists for support and development: <lttng-dev@lists.lttng.org>.
817.PP
818You can find us on IRC server irc.oftc.net (OFTC) in #lttng.
819.PP
820.SH "THANKS"
821
822.PP
823Thanks to Yannick Brosseau without whom this project would never have been so
824lean and mean! Also thanks to the Ericsson teams working on tracing which
fa072eae 825helped us greatly with detailed bug reports and unusual test cases.
6991b181
DG
826
827Thanks to our beloved packager Alexandre Montplaisir-Goncalves (Ubuntu and PPA
828maintainer) and Jon Bernard for our Debian packages.
829
830Special thanks to Michel Dagenais and the DORSAL laboratory at Polytechnique de
831Montreal for the LTTng journey.
c9e32613 832.PP
6991b181
DG
833.SH "AUTHORS"
834
835.PP
836lttng-tools was originally written by Mathieu Desnoyers, Julien Desfossez and
837David Goulet. More people have since contributed to it. It is currently
838maintained by David Goulet <dgoulet@efficios.com>.
839.PP
This page took 0.110797 seconds and 4 git commands to generate.