lttng-save(1): add usage examples
[lttng-tools.git] / doc / man / lttng-save.1.txt
index baf51fded03b9ccfd6baf871cadba0fe0d369c65..b9c334592436cf3a0bb0f013c06797fc642cfc88 100644 (file)
@@ -1,6 +1,6 @@
 lttng-save(1)
 =============
-:revdate: 3 May 2021
+:revdate: 17 May 2021
 
 
 NAME
@@ -11,7 +11,8 @@ lttng-save - Save LTTng tracing session configurations
 SYNOPSIS
 --------
 [verse]
-*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *save* [option:--force] [option:--output-path='DIR'] ['SESSION']
+*lttng* ['linkgenoptions:(GENERAL OPTIONS)'] *save* [option:--force] [option:--output-path='DIR']
+      [option:--all | 'SESSION']
 
 
 DESCRIPTION
@@ -22,9 +23,10 @@ With the 'SESSION' argument::
        The tracing session named 'SESSION'.
 
 Without the 'SESSION' argument::
-    *All* the tracing sessions of the connected session daemon for your
-    Unix user, or for all users if your Unix user is `root`, as listed
-    in the output of `lttng list` (see man:lttng-list(1)).
+    Implicit option:--all option: *all* the tracing sessions of the
+    connected session daemon for your Unix user, or for all users if
+    your Unix user is `root`, as listed in the output of `lttng list`
+    (see man:lttng-list(1)).
 +
 See the ``Session daemon connection'' section of man:lttng(1) to learn
 how a user application connects to a session daemon.
@@ -49,8 +51,10 @@ session configuration files: the command fails. Allow the `save` command
 to overwrite existing tracing session configuration files with the
 option:--force option.
 
+See the <<examples,EXAMPLES>> section below for usage examples.
 
-include::common-cmd-options-head.txt[]
+
+include::common-lttng-cmd-options-head.txt[]
 
 
 option:-a, option:--all::
@@ -69,14 +73,49 @@ option:-o 'DIR', option:--output-path='DIR'::
     `$HOME`).
 
 
-include::common-cmd-help-options.txt[]
+include::common-lttng-cmd-help-options.txt[]
+
+
+include::common-lttng-cmd-after-options.txt[]
+
+
+[[examples]]
+EXAMPLES
+--------
+.Save all the tracing session configurations to the default output directory.
+====
+[role="term"]
+----
+$ lttng save
+----
+====
+
+.Save a specific tracing session configuration to a specific output directory.
+====
+See the option:--output-path option.
+
+[role="term"]
+----
+$ lttng save my-session --output-path=/path/to/sessions
+----
+====
+
+.Allow LTTng to overwrite existing tracing session configuration files when saving.
+====
+See the option:--force option.
+
+[role="term"]
+----
+$ lttng save --force
+----
+====
 
 
-include::common-cmd-footer.txt[]
+include::common-footer.txt[]
 
 
 SEE ALSO
 --------
 man:lttng(1),
-man:lttng-concepts(7),
-man:lttng-load(1)
+man:lttng-load(1),
+man:lttng-concepts(7)
This page took 0.025026 seconds and 5 git commands to generate.