Import CStringView from the Babeltrace tree
[lttng-tools.git] / doc / man / lttng-destroy.1.txt
... / ...
CommitLineData
1lttng-destroy(1)
2================
3:revdate: 14 June 2021
4
5
6NAME
7----
8lttng-destroy - Destroy LTTng recording sessions
9
10
11SYNOPSIS
12--------
13[verse]
14*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *destroy* [option:--no-wait] [option:--all | option:--glob 'SESSION' | 'SESSION']
15
16
17DESCRIPTION
18-----------
19The `lttng destroy` command destroys:
20
21With the 'SESSION' argument::
22 The recording session named 'SESSION'.
23
24With the option:--all option::
25 *All* the recording sessions of the connected session daemon for
26 your Unix user, or for all users if your Unix user is `root`, as
27 listed in the output of `lttng list` (see man:lttng-list(1)).
28+
29See the ``Session daemon connection'' section of man:lttng(1) to learn
30how a user application connects to a session daemon.
31
32Otherwise::
33 The current recording session (see man:lttng-concepts(7) to learn
34 more about the current recording session).
35+
36In that case, the current recording session becomes nonexistent.
37
38See man:lttng-concepts(7) to learn more about recording sessions.
39
40``Destroying'' a recording session means freeing the resources which the
41LTTng daemons and tracers acquired for it, also making sure to flush all
42the recorded trace data to either the local file system or the connected
43LTTng relay daemon (see man:lttng-relayd(8)), depending on the recording
44session mode.
45
46The `destroy` command stops any recording activity within the selected
47recording session(s). By default, the command runs an implicit
48man:lttng-stop(1) command to ensure that the trace data of the recording
49session(s) is valid before it exits. Make the command exit immediately
50with the option:--no-wait option. In this case, however, the traces(s)
51might not be valid when the command exits, and there's no way to know
52when it/they become valid.
53
54If, for a recording session{nbsp}__RS__ to destroy with the `destroy`
55command, the following statements are true:
56
57* You don't specify the option:--no-wait option.
58
59* LTTng archived the current trace chunk (see man:lttng-concepts(7))
60 of{nbsp}__RS__ at least once during its lifetime.
61
62Then all the subdirectories of the output directory of{nbsp}__RS__
63(local or remote) are considered trace chunk archives once the `destroy`
64command exits. In other words, it's safe to read them, modify them, move
65them, or remove then.
66
67See the ``<<examples,EXAMPLES>>'' section below for usage examples.
68
69
70include::common-lttng-cmd-options-head.txt[]
71
72
73option:-a, option:--all::
74 Destroy all the recording sessions of your Unix user, or of all
75 users if your Unix user is `root`, as listed in the output of
76 man:lttng-list(1), instead of the current recording session or the
77 recording session named 'SESSION'.
78
79option:-g, option:--glob::
80 Interpret SESSION as a globbing pattern.
81
82option:-n, option:--no-wait::
83 Do :not: ensure that the trace data of the recording session(s) to
84 destroy is valid before exiting.
85
86
87include::common-lttng-cmd-help-options.txt[]
88
89
90include::common-lttng-cmd-after-options.txt[]
91
92
93[[examples]]
94EXAMPLES
95--------
96.Destroy the current recording session.
97====
98[role="term"]
99----
100$ lttng destroy
101----
102====
103
104.Destroy the current recording session without waiting for completion.
105====
106See the option:--no-wait option.
107
108[role="term"]
109----
110$ lttng destroy --no-wait
111----
112====
113
114.Destroy a specific recording session.
115====
116[role="term"]
117----
118$ lttng destroy my-session
119----
120====
121
122.Destroy all recording sessions.
123====
124See the option:--all option.
125
126[role="term"]
127----
128$ lttng destroy --all
129----
130====
131
132.Destroy all recording sessions with the suffix foo.
133====
134See the option:--glob option.
135
136[role="term"]
137----
138$ lttng destroy --global '*foo'
139----
140====
141
142
143include::common-footer.txt[]
144
145
146SEE ALSO
147--------
148man:lttng(1),
149man:lttng-create(1),
150man:lttng-list(1),
151man:lttng-concepts(7)
This page took 0.023521 seconds and 5 git commands to generate.