1LTTNG-DESTROY(1) LTTng Manual LTTNG-DESTROY(1)
2
3
4
6 lttng-destroy - Destroy LTTng recording sessions
7
9 lttng [GENERAL OPTIONS] destroy [--no-wait] [--all | SESSION]
10
12 The lttng destroy command destroys:
13
14 With the SESSION argument
15 The recording session named SESSION.
16
17 With the --all option
18 All the recording sessions of the connected session daemon for your
19 Unix user, or for all users if your Unix user is root, as listed in
20 the output of lttng list (see lttng-list(1)).
21
22 See the “Session daemon connection” section of lttng(1) to learn
23 how a user application connects to a session daemon.
24
25 Otherwise
26 The current recording session (see lttng-concepts(7) to learn more
27 about the current recording session).
28
29 In that case, the current recording session becomes nonexistent.
30
31 See lttng-concepts(7) to learn more about recording sessions.
32
33 “Destroying” a recording session means freeing the resources which the
34 LTTng daemons and tracers acquired for it, also making sure to flush
35 all the recorded trace data to either the local file system or the
36 connected LTTng relay daemon (see lttng-relayd(8)), depending on the
37 recording session mode.
38
39 The destroy command stops any recording activity within the selected
40 recording session(s). By default, the command runs an implicit lttng-
41 stop(1) command to ensure that the trace data of the recording
42 session(s) is valid before it exits. Make the command exit immediately
43 with the --no-wait option. In this case, however, the traces(s) might
44 not be valid when the command exits, and there’s no way to know when
45 it/they become valid.
46
47 If, for a recording session RS to destroy with the destroy command, the
48 following statements are true:
49
50 • You don’t specify the --no-wait option.
51
52 • LTTng archived the current trace chunk (see lttng-concepts(7))
53 of RS at least once during its lifetime.
54
55 Then all the subdirectories of the output directory of RS (local or
56 remote) are considered trace chunk archives once the destroy command
57 exits. In other words, it’s safe to read them, modify them, move them,
58 or remove then.
59
60 See the “EXAMPLES” section below for usage examples.
61
63 See lttng(1) for GENERAL OPTIONS.
64
65 -a, --all
66 Destroy all the recording sessions of your Unix user, or of all
67 users if your Unix user is root, as listed in the output of lttng-
68 list(1), instead of the current recording session or the recording
69 session named SESSION.
70
71 -n, --no-wait
72 Do NOT ensure that the trace data of the recording session(s) to
73 destroy is valid before exiting.
74
75 Program information
76 -h, --help
77 Show help.
78
79 This option attempts to launch /usr/bin/man to view this manual
80 page. Override the manual pager path with the LTTNG_MAN_BIN_PATH
81 environment variable.
82
83 --list-options
84 List available command options and quit.
85
87 0
88 Success
89
90 1
91 Command error
92
93 2
94 Undefined command
95
96 3
97 Fatal error
98
99 4
100 Command warning (something went wrong during the command)
101
103 LTTNG_ABORT_ON_ERROR
104 Set to 1 to abort the process after the first error is encountered.
105
106 LTTNG_HOME
107 Path to the LTTng home directory.
108
109 Defaults to $HOME.
110
111 Useful when the Unix user running the commands has a non-writable
112 home directory.
113
114 LTTNG_MAN_BIN_PATH
115 Absolute path to the manual pager to use to read the LTTng
116 command-line help (with lttng-help(1) or with the --help option)
117 instead of /usr/bin/man.
118
119 LTTNG_SESSION_CONFIG_XSD_PATH
120 Path to the directory containing the session.xsd recording session
121 configuration XML schema.
122
123 LTTNG_SESSIOND_PATH
124 Absolute path to the LTTng session daemon binary (see lttng-
125 sessiond(8)) to spawn from the lttng-create(1) command.
126
127 The --sessiond-path general option overrides this environment
128 variable.
129
131 $LTTNG_HOME/.lttngrc
132 Unix user’s LTTng runtime configuration.
133
134 This is where LTTng stores the name of the Unix user’s current
135 recording session between executions of lttng(1). lttng-create(1)
136 and lttng-set-session(1) set the current recording session.
137
138 $LTTNG_HOME/lttng-traces
139 Default output directory of LTTng traces in local and snapshot
140 modes.
141
142 Override this path with the --output option of the lttng-create(1)
143 command.
144
145 $LTTNG_HOME/.lttng
146 Unix user’s LTTng runtime and configuration directory.
147
148 $LTTNG_HOME/.lttng/sessions
149 Default directory containing the Unix user’s saved recording
150 session configurations (see lttng-save(1) and lttng-load(1)).
151
152 /usr/local/etc/lttng/sessions
153 Directory containing the system-wide saved recording session
154 configurations (see lttng-save(1) and lttng-load(1)).
155
156 Note
157 $LTTNG_HOME defaults to the value of the HOME environment variable.
158
160 Example 1. Destroy the current recording session.
161
162 $ lttng destroy
163
164 Example 2. Destroy the current recording session without waiting for
165 completion.
166
167 See the --no-wait option.
168
169 $ lttng destroy --no-wait
170
171 Example 3. Destroy a specific recording session.
172
173 $ lttng destroy my-session
174
175 Example 4. Destroy all recording sessions.
176
177 See the --all option.
178
179 $ lttng destroy --all
180
182 • LTTng project website <https://lttng.org>
183
184 • LTTng documentation <https://lttng.org/docs>
185
186 • LTTng bug tracker <https://bugs.lttng.org>
187
188 • Git repositories <https://git.lttng.org>
189
190 • GitHub organization <https://github.com/lttng>
191
192 • Continuous integration <https://ci.lttng.org/>
193
194 • Mailing list <https://lists.lttng.org/> for support and
195 development: lttng-dev@lists.lttng.org
196
197 • IRC channel <irc://irc.oftc.net/lttng>: #lttng on irc.oftc.net
198
200 This program is part of the LTTng-tools project.
201
202 LTTng-tools is distributed under the GNU General Public License
203 version 2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html>.
204 See the LICENSE <https://github.com/lttng/lttng-
205 tools/blob/master/LICENSE> file for details.
206
208 Special thanks to Michel Dagenais and the DORSAL laboratory
209 <http://www.dorsal.polymtl.ca/> at École Polytechnique de Montréal for
210 the LTTng journey.
211
212 Also thanks to the Ericsson teams working on tracing which helped us
213 greatly with detailed bug reports and unusual test cases.
214
216 lttng(1), lttng-create(1), lttng-list(1), lttng-concepts(7)
217
218
219
220LTTng 2.13.9 14 June 2021 LTTNG-DESTROY(1)