| 1 | lttng-clear(1) |
| 2 | =============== |
| 3 | :revdate: 2 April 2020 |
| 4 | |
| 5 | NAME |
| 6 | ---- |
| 7 | lttng-clear - Clear a tracing session |
| 8 | |
| 9 | |
| 10 | SYNOPSIS |
| 11 | -------- |
| 12 | [verse] |
| 13 | *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *clear* ['SESSION' | option:--all] |
| 14 | |
| 15 | |
| 16 | DESCRIPTION |
| 17 | ----------- |
| 18 | The `lttng clear` command clears one or more tracing sessions, that is, |
| 19 | it deletes the contents of their tracing buffers and all their local and |
| 20 | streamed trace data. |
| 21 | |
| 22 | If no options are specified, the current tracing session is cleared |
| 23 | (see man:lttng-create(1) for more information about the current |
| 24 | tracing session). |
| 25 | |
| 26 | If 'SESSION' is specified, the existing tracing session named 'SESSION' |
| 27 | is cleared. |
| 28 | |
| 29 | With the option:--all option, *all* the tracing sessions, as listed in |
| 30 | the output of `lttng list` (see man:lttng-list(1)), are cleared. |
| 31 | |
| 32 | If a tracing session is configured in snapshot mode (see the |
| 33 | man:lttng-create(1) command's nloption:--snapshot option), only the |
| 34 | tracing buffers are cleared. |
| 35 | |
| 36 | For a given tracing session, if at least one rotation occurred (see |
| 37 | man:lttng-rotate(1)), only its tracing buffers and its current trace |
| 38 | chunk are cleared; its archived trace chunks are :not: cleared. |
| 39 | |
| 40 | NOTE: The nloption:--disallow-clear option and the |
| 41 | `LTTNG_RELAYD_DISALLOW_CLEAR` environment variable of |
| 42 | man:lttng-relayd(8) can disable remote clearing operations. If LTTng |
| 43 | sends tracing data over the network for 'SESSION' (or for any tracing |
| 44 | session with the option:--all option) to a relay daemon configured as |
| 45 | such, `lttng clear` fails. |
| 46 | |
| 47 | |
| 48 | include::common-cmd-options-head.txt[] |
| 49 | |
| 50 | |
| 51 | Target |
| 52 | ~~~~~~ |
| 53 | option:-a, option:--all:: |
| 54 | Clear all the tracing sessions instead of the current tracing |
| 55 | session or the tracing session named 'SESSION'. |
| 56 | |
| 57 | |
| 58 | include::common-cmd-help-options.txt[] |
| 59 | |
| 60 | |
| 61 | include::common-cmd-footer.txt[] |
| 62 | |
| 63 | |
| 64 | SEE ALSO |
| 65 | -------- |
| 66 | man:lttng-create(1), |
| 67 | man:lttng-rotate(1), |
| 68 | man:lttng-set-session(1), |
| 69 | man:lttng-relayd(8), |
| 70 | man:lttng(1) |