Commit | Line | Data |
---|---|---|
73b818e7 | 1 | lttng-clear(1) |
484b2a0c | 2 | ============== |
07157184 | 3 | :revdate: 17 May 2021 |
73b818e7 JR |
4 | |
5 | NAME | |
6 | ---- | |
188419c4 | 7 | lttng-clear - Clear an LTTng tracing session |
73b818e7 JR |
8 | |
9 | ||
10 | SYNOPSIS | |
11 | -------- | |
12 | [verse] | |
dab6a2a3 | 13 | *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *clear* ['SESSION' | option:--all] |
73b818e7 JR |
14 | |
15 | ||
16 | DESCRIPTION | |
17 | ----------- | |
dab6a2a3 | 18 | The `lttng clear` command clears one or more tracing sessions, that is, |
484b2a0c PP |
19 | it deletes the contents of their tracing buffers and of all their local |
20 | and streamed trace data. | |
73b818e7 | 21 | |
188419c4 PP |
22 | See man:lttng-concepts(7) to learn more about tracing sessions. |
23 | ||
484b2a0c | 24 | The `clear` command clears: |
73b818e7 | 25 | |
484b2a0c PP |
26 | Without any option:: |
27 | The current tracing session. | |
28 | + | |
188419c4 PP |
29 | See man:lttng-concepts(7) to learn more about the current tracing |
30 | session. | |
73b818e7 | 31 | |
484b2a0c | 32 | With the 'SESSION' argument:: |
188419c4 | 33 | The tracing session named 'SESSION'. |
484b2a0c PP |
34 | |
35 | With the option:--all option:: | |
188419c4 PP |
36 | *All* the tracing sessions of the connected session daemon for your |
37 | Unix user, or for all users if your Unix user is `root`, as listed | |
38 | in the output of `lttng list` (see man:lttng-list(1)). | |
39 | + | |
40 | See the ``Session daemon connection'' section of man:lttng(1) to learn | |
41 | how a user application connects to a session daemon. | |
73b818e7 | 42 | |
dab6a2a3 | 43 | If a tracing session is configured in snapshot mode (see the |
484b2a0c PP |
44 | nloption:--snapshot option of the man:lttng-create(1) command), the |
45 | `clear` command only clears the tracing buffers. | |
73b818e7 | 46 | |
dab6a2a3 | 47 | For a given tracing session, if at least one rotation occurred (see |
188419c4 | 48 | man:lttng-concepts(7)), the `clear` command only clears its tracing |
484b2a0c | 49 | buffers and its current trace chunk, :not: its archived trace chunks. |
73b818e7 | 50 | |
dab6a2a3 PP |
51 | NOTE: The nloption:--disallow-clear option and the |
52 | `LTTNG_RELAYD_DISALLOW_CLEAR` environment variable of | |
53 | man:lttng-relayd(8) can disable remote clearing operations. If LTTng | |
484b2a0c PP |
54 | sends tracing data over the network for the selected tracing session(s) |
55 | to an LTTng relay daemon configured as such, the `clear` command fails. | |
73b818e7 | 56 | |
07157184 PP |
57 | See the <<examples,EXAMPLES>> section below for usage examples. |
58 | ||
73b818e7 | 59 | |
55e06994 | 60 | include::common-lttng-cmd-options-head.txt[] |
73b818e7 JR |
61 | |
62 | ||
484b2a0c PP |
63 | Recording target |
64 | ~~~~~~~~~~~~~~~~ | |
73b818e7 | 65 | option:-a, option:--all:: |
188419c4 PP |
66 | Clear all the tracing sessions of your Unix user, or of all users if |
67 | your Unix user is `root`, as listed in the output of | |
68 | man:lttng-list(1), instead of the current tracing session or the | |
69 | tracing session named 'SESSION'. | |
dab6a2a3 | 70 | |
73b818e7 | 71 | |
55e06994 | 72 | include::common-lttng-cmd-help-options.txt[] |
73b818e7 JR |
73 | |
74 | ||
55e06994 PP |
75 | include::common-lttng-cmd-after-options.txt[] |
76 | ||
77 | ||
07157184 PP |
78 | [[examples]] |
79 | EXAMPLES | |
80 | -------- | |
81 | .Clear the current tracing session. | |
82 | ==== | |
83 | [role="term"] | |
84 | ---- | |
85 | $ lttng clear | |
86 | ---- | |
87 | ==== | |
88 | ||
89 | .Clear a specific tracing session. | |
90 | ==== | |
91 | [role="term"] | |
92 | ---- | |
93 | $ lttng clear my-session | |
94 | ---- | |
95 | ==== | |
96 | ||
97 | .Clear all tracing sessions. | |
98 | ==== | |
99 | See the option:--all option. | |
100 | ||
101 | [role="term"] | |
102 | ---- | |
103 | $ lttng clear --all | |
104 | ---- | |
105 | ==== | |
106 | ||
107 | ||
55e06994 | 108 | include::common-footer.txt[] |
73b818e7 JR |
109 | |
110 | ||
111 | SEE ALSO | |
112 | -------- | |
484b2a0c | 113 | man:lttng(1), |
dab6a2a3 | 114 | man:lttng-create(1), |
21b35b3a | 115 | man:lttng-concepts(7), |
188419c4 | 116 | man:lttng-relayd(8) |