X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=doc%2Fman%2Flttng-stop.1.txt;h=ca1129df3ac5769297296cd411cd652be90ffe4b;hb=HEAD;hp=10ed6b60eac6a4e4cba0f85e16c65abf4111aa85;hpb=fb58d65962522bcce00b34f847d490695d51b9cc;p=lttng-tools.git diff --git a/doc/man/lttng-stop.1.txt b/doc/man/lttng-stop.1.txt index 10ed6b60e..ca1129df3 100644 --- a/doc/man/lttng-stop.1.txt +++ b/doc/man/lttng-stop.1.txt @@ -1,59 +1,138 @@ lttng-stop(1) ============= +:revdate: 14 June 2021 NAME ---- -lttng-stop - Stop LTTng tracers +lttng-stop - Stop an LTTng recording session SYNOPSIS -------- [verse] -*lttng* ['GENERAL OPTIONS'] *stop* [option:--no-wait] ['SESSION'] +*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *stop* [option:--no-wait] [option:--all | option:--glob 'SESSION' | 'SESSION'] DESCRIPTION ----------- -The `lttng stop` command stops the various LTTng tracers for a given -active tracing session. +The `lttng stop` command stops a recording session, that is, it +deactivates the LTTng tracers for: -Stoping 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 recording session named 'SESSION'. -A tracing session with no running tracers is said to be _inactive_. -Inactive tracing sessions can be set active using the -linklttng:lttng-start(1) command. +Without the 'SESSION' argument:: + The current recording session (see man:lttng-concepts(7) to learn more + about the current recording session). -If 'SESSION' is omitted, the LTTng tracers are stopped for the current -tracing session (see linklttng: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 linklttng:lttng-list(1)). +See man:lttng-concepts(7) to learn more about recording 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 recording session must be active (started; see +man:lttng-start(1)). A recording session is inactive on creation (see +man:lttng-create(1)). +A `stop-session` trigger action can also stop a recording session (see +man:lttng-add-trigger(1)). -include::common-cmd-options-head.txt[] +Start an inactive recording session with the man:lttng-start(1) command. + +By default, the `stop` command ensures that the trace data of the +selected recording 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 recording 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 recording +session remains inactive, it's :not: a trace chunk archive: you need to +destroy the recording 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 recording + session is valid before exiting. + +option:-a, option:--all:: + Stop all sessions. + +option:-g, option:--glob:: + Interpret SESSION as a globbing pattern. + +include::common-lttng-cmd-help-options.txt[] + + +include::common-lttng-cmd-after-options.txt[] + + +[[examples]] +EXAMPLES +-------- +.Stop the current recording session. +==== +[role="term"] +---- +$ lttng stop +---- +==== + +.Stop a specific recording session. +==== +[role="term"] +---- +$ lttng stop my-session +---- +==== + +.Stop the current recording session without waiting for completion. +==== +See the option:--no-wait option. + +[role="term"] +---- +$ lttng stop --no-wait +---- +==== + +.Stop all sessions. +==== +See the option:--all option. +[role="term"] +---- +$ lttng stop --all +---- +==== -include::common-cmd-help-options.txt[] +.Stop all sessions with the suffix foo. +==== +See the option:--glob option. + +[role="term"] +---- +$ lttng stop --glob '*foo' +---- +==== -include::common-cmd-footer.txt[] +include::common-footer.txt[] SEE ALSO -------- -linklttng:lttng-start(1), -linklttng:lttng(1) +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-concepts(7)