1LTTNG-STOP(1) LTTng Manual LTTNG-STOP(1)
2
3
4
6 lttng-stop - Stop an LTTng recording session
7
9 lttng [GENERAL OPTIONS] stop [--no-wait] [SESSION]
10
12 The lttng stop command stops a recording session, that is, it
13 deactivates the LTTng tracers for:
14
15 With the SESSION argument
16 The recording session named SESSION.
17
18 Without the SESSION argument
19 The current recording session (see lttng-concepts(7) to learn more
20 about the current recording session).
21
22 See lttng-concepts(7) to learn more about recording sessions.
23
24 The selected recording session must be active (started; see lttng-
25 start(1)). A recording session is inactive on creation (see lttng-
26 create(1)).
27
28 A stop-session trigger action can also stop a recording session (see
29 lttng-add-trigger(1)).
30
31 Start an inactive recording session with the lttng-start(1) command.
32
33 By default, the stop command ensures that the trace data of the
34 selected recording session is valid before it exits. Make the command
35 exit immediately with the --no-wait option. In this case, however, the
36 traces(s) might not be valid when the command exits, and there’s no way
37 to know when it/they becomes valid.
38
39 If LTTng archived the current trace chunk (see lttng-rotate(1) and
40 lttng-enable-rotation(1)) of the selected recording session at least
41 once during its lifetime, the stop command renames the current trace
42 chunk subdirectory and prints the renamed path. Although it’s safe to
43 read the content of this renamed subdirectory while the recording
44 session remains inactive, it’s NOT a trace chunk archive: you need to
45 destroy the recording session with lttng-destroy(1) or perform a
46 rotation with lttng-rotate(1) to archive it.
47
48 See the “EXAMPLES” section below for usage examples.
49
51 See lttng(1) for GENERAL OPTIONS.
52
53 -n, --no-wait
54 Do NOT ensure that the trace data of the selected recording session
55 is valid before exiting.
56
57 Program information
58 -h, --help
59 Show help.
60
61 This option attempts to launch /usr/bin/man to view this manual
62 page. Override the manual pager path with the LTTNG_MAN_BIN_PATH
63 environment variable.
64
65 --list-options
66 List available command options and quit.
67
69 0
70 Success
71
72 1
73 Command error
74
75 2
76 Undefined command
77
78 3
79 Fatal error
80
81 4
82 Command warning (something went wrong during the command)
83
85 LTTNG_ABORT_ON_ERROR
86 Set to 1 to abort the process after the first error is encountered.
87
88 LTTNG_HOME
89 Path to the LTTng home directory.
90
91 Defaults to $HOME.
92
93 Useful when the Unix user running the commands has a non-writable
94 home directory.
95
96 LTTNG_MAN_BIN_PATH
97 Absolute path to the manual pager to use to read the LTTng
98 command-line help (with lttng-help(1) or with the --help option)
99 instead of /usr/bin/man.
100
101 LTTNG_SESSION_CONFIG_XSD_PATH
102 Path to the directory containing the session.xsd recording session
103 configuration XML schema.
104
105 LTTNG_SESSIOND_PATH
106 Absolute path to the LTTng session daemon binary (see lttng-
107 sessiond(8)) to spawn from the lttng-create(1) command.
108
109 The --sessiond-path general option overrides this environment
110 variable.
111
113 $LTTNG_HOME/.lttngrc
114 Unix user’s LTTng runtime configuration.
115
116 This is where LTTng stores the name of the Unix user’s current
117 recording session between executions of lttng(1). lttng-create(1)
118 and lttng-set-session(1) set the current recording session.
119
120 $LTTNG_HOME/lttng-traces
121 Default output directory of LTTng traces in local and snapshot
122 modes.
123
124 Override this path with the --output option of the lttng-create(1)
125 command.
126
127 $LTTNG_HOME/.lttng
128 Unix user’s LTTng runtime and configuration directory.
129
130 $LTTNG_HOME/.lttng/sessions
131 Default directory containing the Unix user’s saved recording
132 session configurations (see lttng-save(1) and lttng-load(1)).
133
134 /usr/local/etc/lttng/sessions
135 Directory containing the system-wide saved recording session
136 configurations (see lttng-save(1) and lttng-load(1)).
137
138 Note
139 $LTTNG_HOME defaults to the value of the HOME environment variable.
140
142 Example 1. Stop the current recording session.
143
144 $ lttng stop
145
146 Example 2. Stop a specific recording session.
147
148 $ lttng stop my-session
149
150 Example 3. Stop the current recording session without waiting for
151 completion.
152
153 See the --no-wait option.
154
155 $ lttng stop --no-wait
156
158 • LTTng project website <https://lttng.org>
159
160 • LTTng documentation <https://lttng.org/docs>
161
162 • LTTng bug tracker <https://bugs.lttng.org>
163
164 • Git repositories <https://git.lttng.org>
165
166 • GitHub organization <https://github.com/lttng>
167
168 • Continuous integration <https://ci.lttng.org/>
169
170 • Mailing list <https://lists.lttng.org/> for support and
171 development: lttng-dev@lists.lttng.org
172
173 • IRC channel <irc://irc.oftc.net/lttng>: #lttng on irc.oftc.net
174
176 This program is part of the LTTng-tools project.
177
178 LTTng-tools is distributed under the GNU General Public License
179 version 2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html>.
180 See the LICENSE <https://github.com/lttng/lttng-
181 tools/blob/master/LICENSE> file for details.
182
184 Special thanks to Michel Dagenais and the DORSAL laboratory
185 <http://www.dorsal.polymtl.ca/> at École Polytechnique de Montréal for
186 the LTTng journey.
187
188 Also thanks to the Ericsson teams working on tracing which helped us
189 greatly with detailed bug reports and unusual test cases.
190
192 lttng(1), lttng-add-trigger(1), lttng-create(1), lttng-enable-event(1),
193 lttng-rotate(1), lttng-start(1), lttng-concepts(7)
194
195
196
197LTTng 2.13.4 14 June 2021 LTTNG-STOP(1)