Commit | Line | Data |
---|---|---|
73b818e7 | 1 | lttng-clear(1) |
484b2a0c | 2 | ============== |
e9711845 | 3 | :revdate: 14 June 2021 |
73b818e7 JR |
4 | |
5 | NAME | |
6 | ---- | |
e9711845 | 7 | lttng-clear - Clear an LTTng recording 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 | ----------- | |
e9711845 PP |
18 | The `lttng clear` command clears one or more recording sessions, that |
19 | is, it deletes the contents of their recording buffers and of all their | |
20 | local and streamed trace data. | |
73b818e7 | 21 | |
e9711845 | 22 | See man:lttng-concepts(7) to learn more about recording sessions. |
26f0c779 | 23 | |
484b2a0c | 24 | The `clear` command clears: |
73b818e7 | 25 | |
484b2a0c | 26 | Without any option:: |
e9711845 | 27 | The current recording session. |
484b2a0c | 28 | + |
e9711845 | 29 | See man:lttng-concepts(7) to learn more about the current recording |
26f0c779 | 30 | session. |
73b818e7 | 31 | |
484b2a0c | 32 | With the 'SESSION' argument:: |
e9711845 | 33 | The recording session named 'SESSION'. |
484b2a0c PP |
34 | |
35 | With the option:--all option:: | |
e9711845 PP |
36 | *All* the recording sessions of the connected session daemon for |
37 | your Unix user, or for all users if your Unix user is `root`, as | |
38 | listed in the output of `lttng list` (see man:lttng-list(1)). | |
26f0c779 PP |
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 | |
e9711845 | 43 | If a recording session is configured in snapshot mode (see the |
484b2a0c | 44 | nloption:--snapshot option of the man:lttng-create(1) command), the |
e9711845 | 45 | `clear` command only clears the recording buffers. |
73b818e7 | 46 | |
e9711845 PP |
47 | For a given recording session, if at least one rotation occurred (see |
48 | man:lttng-concepts(7)), the `clear` command only clears its recording | |
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 | |
e9711845 PP |
54 | sends recording data over the network for the selected recording |
55 | session(s) to an LTTng relay daemon configured as such, the `clear` | |
56 | command fails. | |
73b818e7 | 57 | |
da39b67c | 58 | See the ``<<examples,EXAMPLES>>'' section below for usage examples. |
97a8d629 | 59 | |
73b818e7 | 60 | |
f5511eea | 61 | include::common-lttng-cmd-options-head.txt[] |
73b818e7 JR |
62 | |
63 | ||
484b2a0c PP |
64 | Recording target |
65 | ~~~~~~~~~~~~~~~~ | |
73b818e7 | 66 | option:-a, option:--all:: |
e9711845 | 67 | Clear all the recording sessions of your Unix user, or of all users if |
26f0c779 | 68 | your Unix user is `root`, as listed in the output of |
e9711845 PP |
69 | man:lttng-list(1), instead of the current recording session or the |
70 | recording session named 'SESSION'. | |
dab6a2a3 | 71 | |
73b818e7 | 72 | |
f5511eea | 73 | include::common-lttng-cmd-help-options.txt[] |
73b818e7 JR |
74 | |
75 | ||
f5511eea PP |
76 | include::common-lttng-cmd-after-options.txt[] |
77 | ||
78 | ||
97a8d629 PP |
79 | [[examples]] |
80 | EXAMPLES | |
81 | -------- | |
e9711845 | 82 | .Clear the current recording session. |
97a8d629 PP |
83 | ==== |
84 | [role="term"] | |
85 | ---- | |
86 | $ lttng clear | |
87 | ---- | |
88 | ==== | |
89 | ||
e9711845 | 90 | .Clear a specific recording session. |
97a8d629 PP |
91 | ==== |
92 | [role="term"] | |
93 | ---- | |
94 | $ lttng clear my-session | |
95 | ---- | |
96 | ==== | |
97 | ||
e9711845 | 98 | .Clear all recording sessions. |
97a8d629 PP |
99 | ==== |
100 | See the option:--all option. | |
101 | ||
102 | [role="term"] | |
103 | ---- | |
104 | $ lttng clear --all | |
105 | ---- | |
106 | ==== | |
107 | ||
108 | ||
f5511eea | 109 | include::common-footer.txt[] |
73b818e7 JR |
110 | |
111 | ||
112 | SEE ALSO | |
113 | -------- | |
484b2a0c | 114 | man:lttng(1), |
dab6a2a3 | 115 | man:lttng-create(1), |
af1c4164 | 116 | man:lttng-concepts(7), |
26f0c779 | 117 | man:lttng-relayd(8) |