lttng-enable-rotation(1): add usage examples
[lttng-tools.git] / doc / man / lttng-enable-rotation.1.txt
index cd8de7309131468db42c44e0795de93cb14203b7..2071848e184c8e0acd894bc15fe1f903bfc91c8a 100644 (file)
@@ -1,11 +1,11 @@
 lttng-enable-rotation(1)
 ========================
-:revdate: 21 April 2021
+:revdate: 17 May 2021
 
 
 NAME
 ----
-lttng-enable-rotation - Set a tracing session rotation schedule
+lttng-enable-rotation - Set an LTTng tracing session rotation schedule
 
 
 SYNOPSIS
@@ -24,12 +24,11 @@ With the option:--session='SESSION' option::
     The tracing session named 'SESSION'.
 
 Without the option:--session option::
-    The current tracing session (see man:lttng-create(1) and
-    man:lttng-set-session(1) to learn more about the current tracing
-    session).
+    The current tracing session (see man:lttng-concepts(7) to learn more
+    about the current tracing session).
 
-See man:lttng-rotate(1) for more information about the concepts of a
-tracing session _rotation_ and a _trace chunk_.
+See man:lttng-concepts(7) to learn more about the tracing session
+rotation and trace chunk concepts.
 
 With the option:--timer='PERIODUS' option, the `enable-rotation` command
 sets a rotation schedule so that LTTng performs an automatic rotation at
@@ -43,7 +42,7 @@ least 'SIZE'.
 For both the option:--timer and option:--size options, LTTng checks the
 schedule condition periodically using the monitor timers of the channels
 of the selected tracing session (see the nloption:--monitor-timer option
-of man:lttng-enable-channel(1)). This means that:
+of the man:lttng-enable-channel(1) command). This means that:
 
 * With the option:--timer='PERIODUS' option, LTTng can perform an
   automatic rotation when the elapsed time since the last automatic
@@ -58,30 +57,32 @@ relies on the precision of the platform implementation of POSIX timers.
 
 You may combine the option:--timer and option:--size options.
 
-The naming convention of a trace chunk archive which an automatic
-rotation operation creates is the same as with the immediate rotation
-command, man:lttng-rotate(1).
+See the man:lttng-concepts(7) to learn how LTTng names a trace chunk
+archive directory.
+
+See the <<examples,EXAMPLES>> section below for usage examples.
 
 Unset a tracing session rotation schedule with the
 man:lttng-disable-rotation(1) command.
 
 [IMPORTANT]
 ====
-The `enable-rotation` command only works when:
+You may only use the `enable-rotation` command when:
 
 * The selected tracing session was created in normal mode or in network
   streaming mode (see man:lttng-create(1)).
 
 * No channel was created with a configured trace file count or size
   limit (see the nloption:--tracefile-size and
-  nloption:--tracefile-count options of man:lttng-enable-channel(1)).
+  nloption:--tracefile-count options of the man:lttng-enable-channel(1)
+  command).
 
 For a given tracing session, LTTng only performs an automatic rotation
-when no other rotation is currently happening.
+when it's not currently performing a rotation.
 ====
 
 
-include::common-cmd-options-head.txt[]
+include::common-lttng-cmd-options-head.txt[]
 
 
 Rotation schedule condition
@@ -95,8 +96,8 @@ The `k`{nbsp}(KiB), `M`{nbsp}(MiB), and `G`{nbsp}(GiB) suffixes are
 supported.
 
 option:--timer='PERIODUS'::
-    Set a rotation schedule so that LTTng performs an automatic rotation at
-    least every 'PERIODUS' microseconds.
+    Set a rotation schedule so that LTTng performs an automatic rotation
+    approximately every 'PERIODUS' microseconds.
 +
 The `ms`{nbsp}(milliseconds), `s`{nbsp}(seconds), `m`{nbsp}(minutes),
 and `h`{nbsp}(hours) suffixes are supported.
@@ -109,10 +110,37 @@ option:-s 'SESSION', option:--session='SESSION'::
     instead of the current tracing session.
 
 
-include::common-cmd-help-options.txt[]
+include::common-lttng-cmd-help-options.txt[]
+
+
+include::common-lttng-cmd-after-options.txt[]
+
+
+[[examples]]
+EXAMPLES
+--------
+.Set the size-based rotation schedule of the current tracing session.
+====
+See the option:--size option.
+
+[role="term"]
+----
+$ lttng disable-rotation --size=256M
+----
+====
+
+.Set the periodic rotation schedule of a specific tracing session.
+====
+See the option:--timer and option:--session options.
+
+[role="term"]
+----
+$ lttng disable-rotation --session=my-session --timer=5m
+----
+====
 
 
-include::common-cmd-footer.txt[]
+include::common-footer.txt[]
 
 
 SEE ALSO
@@ -120,4 +148,5 @@ SEE ALSO
 man:lttng(1),
 man:lttng-create(1),
 man:lttng-disable-rotation(1),
-man:lttng-rotate(1)
+man:lttng-rotate(1),
+man:lttng-concepts(7)
This page took 0.025209 seconds and 4 git commands to generate.