doc/man: use double quotes when referring to internal section
[lttng-tools.git] / doc / man / lttng-snapshot.1.txt
index a65156f9c89c58a43b4e4d224ede10bd6484a2ac..7886bbde54bc258d2a67fc2883ad878ce04e7f24 100644 (file)
@@ -1,6 +1,6 @@
 lttng-snapshot(1)
 =================
-:revdate: 3 May 2021
+:revdate: 17 May 2021
 
 
 NAME
@@ -55,7 +55,7 @@ the selected tracing session.
 When LTTng takes a snapshot, it sends the sub-buffer dump of the
 selected tracing session to the local file system or over the network to
 a listening relay daemon (man:lttng-relayd(8)). See the
-<<output,Snapshot output>> section below to learn more.
+``<<output,Snapshot output>>'' section below to learn more.
 
 When LTTng takes a snapshot, it does :not: clear the sub-buffers of the
 selected tracing session. In other words, different snapshots of the
@@ -69,6 +69,8 @@ to use the `snapshot` command.
 A `snapshot-session` trigger action can also take a tracing session
 snapshot (see man:lttng-add-trigger(1)).
 
+See the ``<<examples,EXAMPLES>>'' section below for usage examples.
+
 If you want, instead, to keep all the trace data, but divide it into
 archived chunks which are then, like snapshots, ready to be processed,
 see the tracing session rotation feature in man:lttng-concepts(7). Trace
@@ -157,7 +159,7 @@ option:-s 'SESSION', option:--session='SESSION'::
 
 Output
 ~~~~~~
-See the <<output,Snapshot output>> section above.
+See the ``<<output,Snapshot output>>'' section above.
 
 option:-C 'URL', option:--ctrl-url='URL'::
     Set the control path URL to 'URL'.
@@ -190,6 +192,62 @@ include::common-lttng-cmd-help-options.txt[]
 include::common-lttng-cmd-after-options.txt[]
 
 
+[[examples]]
+EXAMPLES
+--------
+.Take a snapshot of the current tracing session, sending the trace files to its snapshot output.
+====
+[role="term"]
+----
+$ lttng snapshot record
+----
+====
+
+.Take a snapshot of a specific tracing session, giving it a custom name.
+====
+See the option:--session and option:--name options.
+
+[role="term"]
+----
+$ lttng snapshot record --session=my-session --name=SNAP
+----
+====
+
+.Take a snapshot of the current tracing session, sending the trace files to a custom location.
+====
+See the ``Output directory'' section of man:lttng-relayd(8) to
+understand where the relay daemon to connect to (`3.96.87.215`) writes
+the received traces.
+
+[role="term"]
+----
+$ lttng snapshot record net://3.96.87.215
+----
+====
+
+.Replace the snapshot output of a specific tracing session with a local file system path.
+====
+See the option:--session option.
+
+[role="term"]
+----
+$ lttng snapshot del-output --session=monk 1
+$ lttng snapshot add-output --session=monk \
+                 file:///path/to/snapshots
+----
+====
+
+.Take a snapshot of the current tracing session, making sure its size is not over 4{nbsp}MiB.
+====
+See the option:--max-size option.
+
+[role="term"]
+----
+$ lttng snapshot record --max-size=4M
+----
+====
+
+
 include::common-footer.txt[]
 
 
This page took 0.02492 seconds and 4 git commands to generate.