| 1 | lttng-clear(1) |
| 2 | =============== |
| 3 | :revdate: 6 November 2019 |
| 4 | |
| 5 | NAME |
| 6 | ---- |
| 7 | lttng-clear - Clear a tracing session |
| 8 | |
| 9 | |
| 10 | SYNOPSIS |
| 11 | -------- |
| 12 | [verse] |
| 13 | *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *clear* [option:--all | 'SESSION'] |
| 14 | |
| 15 | |
| 16 | DESCRIPTION |
| 17 | ----------- |
| 18 | The `lttng clear` command clears one or more tracing sessions. |
| 19 | |
| 20 | If no options are specified, the current tracing session is cleared |
| 21 | (see man:lttng-create(1) for more information about the current |
| 22 | tracing session). |
| 23 | |
| 24 | If 'SESSION' is specified, the existing tracing session named 'SESSION' |
| 25 | is cleared. |
| 26 | |
| 27 | If the option:--all option is used, *all* the tracing sessions, as listed |
| 28 | in the output of `lttng list`, are cleared. |
| 29 | |
| 30 | Clearing a tracing session deletes the contents of the tracing buffers and |
| 31 | all local or streamed trace data. |
| 32 | |
| 33 | If a session is configured in snapshot mode, only the tracing buffers are cleared. |
| 34 | |
| 35 | If at least one rotation occurred, only the tracing buffers and the current |
| 36 | trace chunks are cleared. Previous trace chunks are not cleared. |
| 37 | |
| 38 | Note that a lttng-relayd daemon can be configured to disallow clear operations |
| 39 | using LTTNG_RELAYD_DISALLOW_CLEAR. Clear commands performed on a streaming |
| 40 | session utilizing such lttng-relayd daemon will fail. |
| 41 | |
| 42 | include::common-cmd-options-head.txt[] |
| 43 | |
| 44 | |
| 45 | option:-a, option:--all:: |
| 46 | Clear all tracing sessions. |
| 47 | |
| 48 | include::common-cmd-help-options.txt[] |
| 49 | |
| 50 | |
| 51 | include::common-cmd-footer.txt[] |
| 52 | |
| 53 | |
| 54 | SEE ALSO |
| 55 | -------- |
| 56 | man:lttng-rotate(1), |
| 57 | man:lttng-set-session(1), |
| 58 | man:lttng(1) |