| 1 | lttng-stop(1) |
| 2 | ============= |
| 3 | :revdate: 14 June 2021 |
| 4 | |
| 5 | |
| 6 | NAME |
| 7 | ---- |
| 8 | lttng-stop - Stop an LTTng recording session |
| 9 | |
| 10 | |
| 11 | SYNOPSIS |
| 12 | -------- |
| 13 | [verse] |
| 14 | *lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *stop* [option:--no-wait] [option:--all | option:--glob 'SESSION' | 'SESSION'] |
| 15 | |
| 16 | |
| 17 | DESCRIPTION |
| 18 | ----------- |
| 19 | The `lttng stop` command stops a recording session, that is, it |
| 20 | deactivates the LTTng tracers for: |
| 21 | |
| 22 | With the 'SESSION' argument:: |
| 23 | The recording session named 'SESSION'. |
| 24 | |
| 25 | Without the 'SESSION' argument:: |
| 26 | The current recording session (see man:lttng-concepts(7) to learn more |
| 27 | about the current recording session). |
| 28 | |
| 29 | See man:lttng-concepts(7) to learn more about recording sessions. |
| 30 | |
| 31 | The selected recording session must be active (started; see |
| 32 | man:lttng-start(1)). A recording session is inactive on creation (see |
| 33 | man:lttng-create(1)). |
| 34 | |
| 35 | A `stop-session` trigger action can also stop a recording session (see |
| 36 | man:lttng-add-trigger(1)). |
| 37 | |
| 38 | Start an inactive recording session with the man:lttng-start(1) command. |
| 39 | |
| 40 | By default, the `stop` command ensures that the trace data of the |
| 41 | selected recording session is valid before it exits. Make the command |
| 42 | exit immediately with the option:--no-wait option. In this case, |
| 43 | however, the traces(s) might not be valid when the command exits, and |
| 44 | there's no way 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 recording 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 recording |
| 51 | session remains inactive, it's :not: a trace chunk archive: you need to |
| 52 | destroy the recording session with man:lttng-destroy(1) or perform a |
| 53 | rotation with man:lttng-rotate(1) to archive it. |
| 54 | |
| 55 | See the ``<<examples,EXAMPLES>>'' section below for usage examples. |
| 56 | |
| 57 | |
| 58 | include::common-lttng-cmd-options-head.txt[] |
| 59 | |
| 60 | |
| 61 | option:-n, option:--no-wait:: |
| 62 | Do :not: ensure that the trace data of the selected recording |
| 63 | session is valid before exiting. |
| 64 | |
| 65 | option:-a, option:--all:: |
| 66 | Stop all sessions. |
| 67 | |
| 68 | option:-g, option:--glob:: |
| 69 | Interpret SESSION as a globbing pattern. |
| 70 | |
| 71 | include::common-lttng-cmd-help-options.txt[] |
| 72 | |
| 73 | |
| 74 | include::common-lttng-cmd-after-options.txt[] |
| 75 | |
| 76 | |
| 77 | [[examples]] |
| 78 | EXAMPLES |
| 79 | -------- |
| 80 | .Stop the current recording session. |
| 81 | ==== |
| 82 | [role="term"] |
| 83 | ---- |
| 84 | $ lttng stop |
| 85 | ---- |
| 86 | ==== |
| 87 | |
| 88 | .Stop a specific recording session. |
| 89 | ==== |
| 90 | [role="term"] |
| 91 | ---- |
| 92 | $ lttng stop my-session |
| 93 | ---- |
| 94 | ==== |
| 95 | |
| 96 | .Stop the current recording session without waiting for completion. |
| 97 | ==== |
| 98 | See the option:--no-wait option. |
| 99 | |
| 100 | [role="term"] |
| 101 | ---- |
| 102 | $ lttng stop --no-wait |
| 103 | ---- |
| 104 | ==== |
| 105 | |
| 106 | .Stop all sessions. |
| 107 | ==== |
| 108 | See the option:--all option. |
| 109 | |
| 110 | [role="term"] |
| 111 | ---- |
| 112 | $ lttng stop --all |
| 113 | ---- |
| 114 | ==== |
| 115 | |
| 116 | .Stop all sessions with the suffix foo. |
| 117 | ==== |
| 118 | See the option:--glob option. |
| 119 | |
| 120 | [role="term"] |
| 121 | ---- |
| 122 | $ lttng stop --glob '*foo' |
| 123 | ---- |
| 124 | ==== |
| 125 | |
| 126 | |
| 127 | include::common-footer.txt[] |
| 128 | |
| 129 | |
| 130 | SEE ALSO |
| 131 | -------- |
| 132 | man:lttng(1), |
| 133 | man:lttng-add-trigger(1), |
| 134 | man:lttng-create(1), |
| 135 | man:lttng-enable-event(1), |
| 136 | man:lttng-rotate(1), |
| 137 | man:lttng-start(1), |
| 138 | man:lttng-concepts(7) |