8 lttng - Control LTTng tracing
14 *lttng* [option:--group='GROUP'] [option:--mi=**xml**] [option:--no-sessiond | option:--sessiond-path='PATH']
15 [option:--quiet | option:-verbose...] '<<commands,COMMAND>>' ['COMMAND OPTIONS']
20 include::common-intro.txt[]
22 The `lttng` command-line tool, as well as any user application linked
23 with the LTTng control library (`liblttng-ctl`), sends commands to a
24 listening LTTng session daemon (man:lttng-sessiond(8)). A session
27 * Manages tracing sessions (see man:lttng-concepts(7) to learn more
28 about tracing sessions).
30 * Controls the various components (like tracers and consumer daemons) of
33 * Sends asynchronous notifications to user applications.
35 By default, the man:lttng-create(1) command automatically spawns a
36 session daemon for your Unix user if none is currently running. Override
37 the path of the session daemon binary to spawn with the
38 option:--sessiond-path option. Avoid automatically spawning a session
39 daemon with the option:--no-sessiond option.
41 NOTE: The LTTng project recommends that you start the session daemon at
42 boot time for stable and long-term tracing.
44 See man:lttng-concepts(7) to learn more about the foundational concepts
47 The `lttng` tool offers a subcommand-based command-line interface. The
48 <<commands,COMMANDS>> section below lists the available commands.
51 Session daemon connection
52 ~~~~~~~~~~~~~~~~~~~~~~~~~
53 For most of its commands, the `lttng` tool needs to connect to a
54 listening LTTng session daemon (man:lttng-sessiond(8)) to control LTTng
57 Each Unix user may have its own independent running session daemon.
58 However, the `lttng` tool must connect to the session daemon of the
59 `root` user (the root session daemon) to control Linux kernel tracing.
61 How the `lttng` tool chooses which session daemon to connect to
64 If your Unix user is `root`::
65 Connect to the root session daemon.
67 If your Unix user is not `root`::
68 If your Unix user is part of the Unix tracing group:::
69 Try to connect to the root session daemon.
71 If the root session daemon isn't running, connect to the session daemon
74 If your Unix user is not part of the tracing group:::
75 Connect to the session daemon of your Unix user.
77 The name of the Unix tracing group is one of:
79 With the nloption:--group='GROUP' option of the root session daemon (man:lttng-sessiond(8))::
82 In that case, you must use the option:--group='GROUP' option, with
83 the same 'GROUP' argument, of the `lttng` tool.
85 Without the nloption:--group option of the root session daemon::
88 LTTng-instrumented user applications automatically register to both the
89 root and user session daemons. This makes it possible for both session
90 daemons to list the available instrumented applications and their
91 instrumentation points (see man:lttng-list(1)).
96 option:-g 'GROUP', option:--group='GROUP'::
97 Set the name of the Unix tracing group to 'GROUP' instead of
100 You must use this option to be able to connect to a root session daemon
101 (man:lttng-sessiond(8)) which was started with its own
102 nloption:--group='GROUP' option.
104 option:-m `xml`, option:--mi=++xml++::
105 Print the command's result using a stable XML machine interface (MI)
106 output instead of the default, unstable human-readable output.
108 With this mode, `lttng` prints the resulting XML document to the
109 standard output, while it prints any error/warning to the standard error
110 with an unstable, human-readable format.
112 If any error occurs during the execution of `lttng`, the command
113 exits with a status different than{nbsp}0, and `lttng` does
114 :not: guarantee the syntax and data validity of its MI output.
116 An XML schema definition (XSD) file used for validation of the MI output
117 is available: see the `src/common/mi_lttng.xsd` file in the LTTng-tools
120 option:-n, option:--no-sessiond::
121 Do not automatically spawn a session daemon for your Unix user when
122 running the man:lttng-create(1) command.
124 You may :not: use this option with the option:--sessiond-path option.
126 option:-q, option:--quiet::
127 Suppress all messages, including warnings and errors.
129 You may :not: use this option with the option:--verbose option.
131 option:--sessiond-path='PATH'::
132 Set the absolute path of the session daemon binary to spawn from the
133 man:lttng-create(1) command to 'PATH'.
135 You may :not: use this option with the option:--no-sessiond option.
137 option:-v, option:--verbose::
140 Specify this option up to three times to get more levels of verbosity.
142 You may :not: use this option with the option:--quiet option.
147 include::common-help-option.txt[]
149 option:--list-commands::
150 List available commands and quit.
152 option:-V, option:--version::
153 Show version and quit.
159 The following commands also have their own nloption:--help option.
166 |Command |Description
168 |man:lttng-create(1) |{cmd_descr_create}.
169 |man:lttng-destroy(1) |{cmd_descr_destroy}.
170 |man:lttng-disable-rotation(1) |{cmd_descr_disable_rotation}.
171 |man:lttng-enable-rotation(1) |{cmd_descr_enable_rotation}.
172 |man:lttng-load(1) |{cmd_descr_load}.
173 |man:lttng-regenerate(1) |{cmd_descr_regenerate}.
174 |man:lttng-rotate(1) |{cmd_descr_rotate}.
175 |man:lttng-save(1) |{cmd_descr_save}.
176 |man:lttng-set-session(1) |{cmd_descr_set_session}.
177 |man:lttng-snapshot(1) |{cmd_descr_snapshot}.
178 |man:lttng-start(1) |{cmd_descr_start}.
179 |man:lttng-status(1) |{cmd_descr_status}.
180 |man:lttng-stop(1) |{cmd_descr_stop}.
188 |Command |Description
190 |man:lttng-add-context(1) |{cmd_descr_add_context}.
191 |man:lttng-disable-channel(1) |{cmd_descr_disable_channel}.
192 |man:lttng-enable-channel(1) |{cmd_descr_enable_channel}.
200 |Command |Description
202 |man:lttng-disable-event(1) |{cmd_descr_disable_event}.
203 |man:lttng-enable-event(1) |{cmd_descr_enable_event}.
210 |Command |Description
212 |man:lttng-list(1) |{cmd_descr_list}.
219 |Command |Description
221 |man:lttng-track(1) |{cmd_descr_track}.
222 |man:lttng-untrack(1) |{cmd_descr_untrack}.
229 |Command |Description
231 |man:lttng-add-trigger(1) |{cmd_descr_add_trigger}.
232 |man:lttng-list-triggers(1) |{cmd_descr_list_triggers}.
233 |man:lttng-remove-trigger(1) |{cmd_descr_remove_trigger}.
240 |Command |Description
242 |man:lttng-help(1) |{cmd_descr_help}.
243 |man:lttng-version(1) |{cmd_descr_version}.
244 |man:lttng-view(1) |{cmd_descr_view}.
248 include::common-lttng-cmd-after-options.txt[]
251 include::common-footer.txt[]
256 man:lttng-concepts(7)
258 man:lttng-sessiond(8)