| 1 | lttng-stop(1) |
| 2 | ============= |
| 3 | :revdate: 29 April 2021 |
| 4 | |
| 5 | |
| 6 | NAME |
| 7 | ---- |
| 8 | lttng-stop - Stop an LTTng tracing session |
| 9 | |
| 10 | |
| 11 | SYNOPSIS |
| 12 | -------- |
| 13 | [verse] |
| 14 | *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *stop* [option:--no-wait] ['SESSION'] |
| 15 | |
| 16 | |
| 17 | DESCRIPTION |
| 18 | ----------- |
| 19 | The `lttng stop` command stops a tracing session, that is, it |
| 20 | deactivates the LTTng tracers for: |
| 21 | |
| 22 | With the 'SESSION' argument:: |
| 23 | The tracing session named 'SESSION'. |
| 24 | |
| 25 | Without the 'SESSION' argument:: |
| 26 | The current tracing session (see man:lttng-concepts(7) to learn more |
| 27 | about the current tracing session). |
| 28 | |
| 29 | See man:lttng-concepts(7) to learn more about tracing sessions. |
| 30 | |
| 31 | The selected tracing session must be active (started; see |
| 32 | man:lttng-start(1)). A tracing session is inactive on creation (see |
| 33 | man:lttng-create(1)). |
| 34 | |
| 35 | A `stop-session` trigger action can also stop a tracing session (see |
| 36 | man:lttng-add-trigger(1)). |
| 37 | |
| 38 | Start an inactive tracing session with the man:lttng-start(1) command. |
| 39 | |
| 40 | By default, the `stop` command ensures that the trace data of the |
| 41 | selected tracing session is valid before it exits. Make the command exit |
| 42 | immediately with the option:--no-wait option. In this case, however, the |
| 43 | traces(s) might not be valid when the command exits, and there's no way |
| 44 | to know when it/they becomes valid. |
| 45 | |
| 46 | If LTTng archived the current trace chunk (see man:lttng-rotate(1) and |
| 47 | man:lttng-enable-rotation(1)) of the selected tracing session at least |
| 48 | once during its lifetime, the `stop` command renames the current trace |
| 49 | chunk subdirectory and prints the renamed path. Although it's safe to |
| 50 | read the content of this renamed subdirectory while the tracing session |
| 51 | remains inactive, it's :not: a trace chunk archive: you need to destroy |
| 52 | the tracing session with man:lttng-destroy(1) or perform a rotation with |
| 53 | man:lttng-rotate(1) to archive it. |
| 54 | |
| 55 | |
| 56 | include::common-lttng-cmd-options-head.txt[] |
| 57 | |
| 58 | |
| 59 | option:-n, option:--no-wait:: |
| 60 | Do :not: ensure that the trace data of the selected tracing session |
| 61 | is valid before exiting. |
| 62 | |
| 63 | |
| 64 | include::common-lttng-cmd-help-options.txt[] |
| 65 | |
| 66 | |
| 67 | include::common-lttng-cmd-after-options.txt[] |
| 68 | |
| 69 | |
| 70 | include::common-footer.txt[] |
| 71 | |
| 72 | |
| 73 | SEE ALSO |
| 74 | -------- |
| 75 | man:lttng(1), |
| 76 | man:lttng-add-trigger(1), |
| 77 | man:lttng-create(1), |
| 78 | man:lttng-enable-event(1), |
| 79 | man:lttng-rotate(1), |
| 80 | man:lttng-start(1), |
| 81 | man:lttng-concepts(7) |