X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=doc%2Fman%2Flttng-stop.1.txt;h=d0371c74d8ee9cd7aadfe703317075c3a3d2521d;hp=e2997e64aec3c82398090f969299ac3f1a8a384c;hb=4182cfea302ab5c0233d45433e7dc85697c4016d;hpb=5de63f6d18f9b58a65b50c8e773cc44a2bc37e0a diff --git a/doc/man/lttng-stop.1.txt b/doc/man/lttng-stop.1.txt index e2997e64a..d0371c74d 100644 --- a/doc/man/lttng-stop.1.txt +++ b/doc/man/lttng-stop.1.txt @@ -1,10 +1,11 @@ lttng-stop(1) ============= +:revdate: 17 May 2021 NAME ---- -lttng-stop - Stop LTTng tracers +lttng-stop - Stop an LTTng tracing session SYNOPSIS @@ -15,45 +16,98 @@ SYNOPSIS DESCRIPTION ----------- -The `lttng stop` command stops the various LTTng tracers for a given -active tracing session. +The `lttng stop` command stops a tracing session, that is, it +deactivates the LTTng tracers for: -Stopping the LTTng tracers has the effect that all enabled event rules -within enabled channels cannot make event sources _emit_ trace events -anymore. +With the 'SESSION' argument:: + The tracing session named 'SESSION'. -A tracing session with no running tracers is said to be _inactive_. -Inactive tracing sessions can be set active using the -man:lttng-start(1) command. +Without the 'SESSION' argument:: + The current tracing session (see man:lttng-concepts(7) to learn more + about the current tracing session). -If 'SESSION' is omitted, the LTTng tracers are stopped for the current -tracing session (see man:lttng-create(1) for more information -about the current tracing session). Otherwise, they are stopped for the -existing tracing session named 'SESSION'. `lttng list` -outputs all the existing tracing sessions (see man:lttng-list(1)). +See man:lttng-concepts(7) to learn more about tracing sessions. -By default, the `lttng stop` command ensures that the tracing session's -trace data is valid before returning to the prompt. With the -option:--no-wait option, the command finishes immediately, hence a local -trace might not be valid when the command is done. In this case, there -is no way to know when the trace becomes valid. +The selected tracing session must be active (started; see +man:lttng-start(1)). A tracing session is inactive on creation (see +man:lttng-create(1)). +A `stop-session` trigger action can also stop a tracing session (see +man:lttng-add-trigger(1)). -include::common-cmd-options-head.txt[] +Start an inactive tracing session with the man:lttng-start(1) command. + +By default, the `stop` command ensures that the trace data of the +selected tracing session is valid before it exits. Make the command exit +immediately with the option:--no-wait option. In this case, however, the +traces(s) might not be valid when the command exits, and there's no way +to know when it/they becomes valid. + +If LTTng archived the current trace chunk (see man:lttng-rotate(1) and +man:lttng-enable-rotation(1)) of the selected tracing session at least +once during its lifetime, the `stop` command renames the current trace +chunk subdirectory and prints the renamed path. Although it's safe to +read the content of this renamed subdirectory while the tracing session +remains inactive, it's :not: a trace chunk archive: you need to destroy +the tracing session with man:lttng-destroy(1) or perform a rotation with +man:lttng-rotate(1) to archive it. + +See the <> section below for usage examples. + + +include::common-lttng-cmd-options-head.txt[] option:-n, option:--no-wait:: - Do not ensure that the chosen tracing session's trace data is valid - before returning to the prompt. + Do :not: ensure that the trace data of the selected tracing session + is valid before exiting. -include::common-cmd-help-options.txt[] +include::common-lttng-cmd-help-options.txt[] + + +include::common-lttng-cmd-after-options.txt[] + + +[[examples]] +EXAMPLES +-------- +.Stop the current tracing session. +==== +[role="term"] +---- +$ lttng stop +---- +==== + +.Stop a specific tracing session. +==== +[role="term"] +---- +$ lttng stop my-session +---- +==== + +.Stop the current tracing session without waiting for completion. +==== +See the option:--no-wait option. + +[role="term"] +---- +$ lttng stop --no-wait +---- +==== -include::common-cmd-footer.txt[] +include::common-footer.txt[] SEE ALSO -------- +man:lttng(1), +man:lttng-add-trigger(1), +man:lttng-create(1), +man:lttng-enable-event(1), +man:lttng-rotate(1), man:lttng-start(1), -man:lttng(1) +man:lttng-concepts(7)