Commit | Line | Data |
---|---|---|
307a8468 PP |
1 | lttng(1) |
2 | ======== | |
188419c4 | 3 | :revdate: 3 May 2021 |
307a8468 PP |
4 | |
5 | ||
6 | NAME | |
7 | ---- | |
188419c4 | 8 | lttng - Control LTTng tracing |
307a8468 PP |
9 | |
10 | ||
11 | SYNOPSIS | |
12 | -------- | |
5d231d82 | 13 | [verse] |
188419c4 | 14 | *lttng* [option:--group='GROUP'] [option:--mi=**xml**] [option:--no-sessiond | option:--sessiond-path='PATH'] |
484b2a0c | 15 | [option:--quiet | option:-verbose...] '<<commands,COMMAND>>' ['COMMAND OPTIONS'] |
307a8468 PP |
16 | |
17 | ||
18 | DESCRIPTION | |
19 | ----------- | |
484b2a0c | 20 | include::common-intro.txt[] |
307a8468 | 21 | |
484b2a0c PP |
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 | |
25 | daemon: | |
307a8468 | 26 | |
188419c4 | 27 | * Manages tracing sessions (see man:lttng-concepts(7) to learn more |
484b2a0c | 28 | about tracing sessions). |
307a8468 | 29 | |
484b2a0c PP |
30 | * Controls the various components (like tracers and consumer daemons) of |
31 | LTTng. | |
307a8468 | 32 | |
484b2a0c | 33 | * Sends asynchronous notifications to user applications. |
307a8468 | 34 | |
484b2a0c PP |
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. | |
307a8468 | 40 | |
484b2a0c PP |
41 | NOTE: The LTTng project recommends that you start the session daemon at |
42 | boot time for stable and long-term tracing. | |
307a8468 | 43 | |
188419c4 PP |
44 | See man:lttng-concepts(7) to learn more about the foundational concepts |
45 | of LTTng. | |
46 | ||
47 | The `lttng` tool offers a subcommand-based command-line interface. The | |
48 | <<commands,COMMANDS>> section below lists the available commands. | |
49 | ||
307a8468 | 50 | |
484b2a0c PP |
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 | |
55 | tracing. | |
307a8468 | 56 | |
484b2a0c PP |
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. | |
307a8468 | 60 | |
484b2a0c PP |
61 | How the `lttng` tool chooses which session daemon to connect to |
62 | is as follows: | |
307a8468 | 63 | |
484b2a0c PP |
64 | If your Unix user is `root`:: |
65 | Connect to the root session daemon. | |
307a8468 | 66 | |
484b2a0c PP |
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. | |
70 | + | |
71 | If the root session daemon isn't running, connect to the session daemon | |
72 | of your Unix user. | |
307a8468 | 73 | |
484b2a0c PP |
74 | If your Unix user is not part of the tracing group::: |
75 | Connect to the session daemon of your Unix user. | |
307a8468 | 76 | |
484b2a0c PP |
77 | The name of the Unix tracing group is one of: |
78 | ||
79 | With the nloption:--group='GROUP' option of the root session daemon (man:lttng-sessiond(8)):: | |
80 | 'GROUP' | |
81 | + | |
82 | In that case, you must use the option:--group='GROUP' option, with | |
83 | the same 'GROUP' argument, of the `lttng` tool. | |
84 | ||
85 | Without the nloption:--group option of the root session daemon:: | |
86 | `tracing` | |
87 | ||
88 | LTTng-instrumented user applications automatically register to both the | |
188419c4 PP |
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)). | |
307a8468 | 92 | |
307a8468 | 93 | |
5d231d82 PP |
94 | OPTIONS |
95 | ------- | |
59b19c3c | 96 | option:-g 'GROUP', option:--group='GROUP':: |
484b2a0c PP |
97 | Set the name of the Unix tracing group to 'GROUP' instead of |
98 | `tracing`. | |
5d231d82 | 99 | + |
484b2a0c PP |
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. | |
103 | ||
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. | |
5d231d82 | 107 | + |
484b2a0c PP |
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. | |
5d231d82 | 111 | + |
484b2a0c PP |
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. | |
5d231d82 | 115 | + |
484b2a0c PP |
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 | |
118 | source tree. | |
307a8468 | 119 | |
5d231d82 | 120 | option:-n, option:--no-sessiond:: |
484b2a0c PP |
121 | Do not automatically spawn a session daemon for your Unix user when |
122 | running the man:lttng-create(1) command. | |
123 | + | |
124 | You may :not: use this option with the option:--sessiond-path option. | |
307a8468 | 125 | |
5d231d82 PP |
126 | option:-q, option:--quiet:: |
127 | Suppress all messages, including warnings and errors. | |
484b2a0c PP |
128 | + |
129 | You may :not: use this option with the option:--verbose option. | |
307a8468 | 130 | |
5d231d82 | 131 | option:--sessiond-path='PATH':: |
484b2a0c PP |
132 | Set the absolute path of the session daemon binary to spawn from the |
133 | man:lttng-create(1) command to 'PATH'. | |
134 | + | |
135 | You may :not: use this option with the option:--no-sessiond option. | |
307a8468 | 136 | |
5d231d82 PP |
137 | option:-v, option:--verbose:: |
138 | Increase verbosity. | |
139 | + | |
484b2a0c PP |
140 | Specify this option up to three times to get more levels of verbosity. |
141 | + | |
142 | You may :not: use this option with the option:--quiet option. | |
307a8468 | 143 | |
307a8468 | 144 | |
5d231d82 PP |
145 | Program information |
146 | ~~~~~~~~~~~~~~~~~~~ | |
484b2a0c | 147 | include::common-help-option.txt[] |
307a8468 | 148 | |
5d231d82 | 149 | option:--list-commands:: |
484b2a0c | 150 | List available commands and quit. |
307a8468 | 151 | |
5d231d82 | 152 | option:-V, option:--version:: |
484b2a0c | 153 | Show version and quit. |
307a8468 | 154 | |
307a8468 | 155 | |
790e4a4c | 156 | [[commands]] |
5d231d82 PP |
157 | COMMANDS |
158 | -------- | |
b5217c86 | 159 | The following commands also have their own nloption:--help option. |
307a8468 | 160 | |
307a8468 | 161 | |
484b2a0c PP |
162 | Tracing session |
163 | ~~~~~~~~~~~~~~~ | |
164 | [options="header"] | |
165 | |=== | |
166 | |Command |Description | |
167 | ||
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}. | |
181 | |=== | |
182 | ||
183 | ||
184 | Channel | |
5d231d82 | 185 | ~~~~~~~ |
484b2a0c PP |
186 | [options="header"] |
187 | |=== | |
188 | |Command |Description | |
307a8468 | 189 | |
484b2a0c PP |
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}. | |
193 | |=== | |
307a8468 | 194 | |
980bb5fd | 195 | |
484b2a0c PP |
196 | Recording event rule |
197 | ~~~~~~~~~~~~~~~~~~~~ | |
198 | [options="header"] | |
199 | |=== | |
200 | |Command |Description | |
980bb5fd | 201 | |
484b2a0c PP |
202 | |man:lttng-disable-event(1) |{cmd_descr_disable_event}. |
203 | |man:lttng-enable-event(1) |{cmd_descr_enable_event}. | |
204 | |=== | |
980bb5fd | 205 | |
484b2a0c PP |
206 | Information |
207 | ~~~~~~~~~~~ | |
208 | [options="header"] | |
209 | |=== | |
210 | |Command |Description | |
980bb5fd | 211 | |
484b2a0c PP |
212 | |man:lttng-list(1) |{cmd_descr_list}. |
213 | |=== | |
980bb5fd | 214 | |
5d231d82 PP |
215 | Resource tracking |
216 | ~~~~~~~~~~~~~~~~~ | |
484b2a0c PP |
217 | [options="header"] |
218 | |=== | |
219 | |Command |Description | |
220 | ||
221 | |man:lttng-track(1) |{cmd_descr_track}. | |
222 | |man:lttng-untrack(1) |{cmd_descr_untrack}. | |
223 | |=== | |
307a8468 | 224 | |
484b2a0c PP |
225 | Trigger |
226 | ~~~~~~~ | |
227 | [options="header"] | |
228 | |=== | |
229 | |Command |Description | |
307a8468 | 230 | |
484b2a0c PP |
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}. | |
234 | |=== | |
307a8468 | 235 | |
5d231d82 PP |
236 | Miscellaneous |
237 | ~~~~~~~~~~~~~ | |
484b2a0c PP |
238 | [options="header"] |
239 | |=== | |
240 | |Command |Description | |
307a8468 | 241 | |
484b2a0c PP |
242 | |man:lttng-help(1) |{cmd_descr_help}. |
243 | |man:lttng-version(1) |{cmd_descr_version}. | |
244 | |man:lttng-view(1) |{cmd_descr_view}. | |
245 | |=== | |
307a8468 PP |
246 | |
247 | ||
5d231d82 | 248 | include::common-cmd-footer.txt[] |
307a8468 PP |
249 | |
250 | ||
251 | SEE ALSO | |
252 | -------- | |
188419c4 | 253 | man:lttng-concepts(7) |
7c1a4458 | 254 | man:lttng-relayd(8), |
484b2a0c | 255 | man:lttng-sessiond(8) |