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