lttng-enable-channel(1): add usage examples
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 17 May 2021 21:39:12 +0000 (17:39 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 19 May 2021 15:24:04 +0000 (11:24 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I26bcfed2b6d71b0bbc2fa89d33f37925c303c91c

doc/man/lttng-enable-channel.1.txt

index c16051dfaf446509ba149089a519b7cfcf64e8a2..6c1091ec150e7b98cff4f2651d269bdff1aeb603 100644 (file)
@@ -1,6 +1,6 @@
 lttng-enable-channel(1)
 =======================
-:revdate: 3 May 2021
+:revdate: 17 May 2021
 
 
 NAME
@@ -63,6 +63,8 @@ Without the option:--session option::
 NOTE: The man:lttng-enable-event(1) command can automatically create a
 default channel when no channel exists for the provided tracing domain.
 
+See the <<examples,EXAMPLES>> section below for usage examples.
+
 List the channels of a given tracing session with the
 man:lttng-list(1) and man:lttng-status(1) commands.
 
@@ -351,6 +353,64 @@ include::common-lttng-cmd-help-options.txt[]
 include::common-lttng-cmd-after-options.txt[]
 
 
+[[examples]]
+EXAMPLES
+--------
+.Create a Linux kernel channel with default attributes in the current tracing session.
+====
+The following command line only creates a new channel if `my-channel`
+doesn't name an existing Linux kernel channel in the current tracing
+session.
+
+[role="term"]
+----
+$ lttng enable-channel --kernel my-channel
+----
+====
+
+.Create a user space channel with a per-process buffering scheme in a specific tracing session.
+====
+See the option:--session and option:--buffers-pid options.
+
+[role="term"]
+----
+$ lttng enable-channel --session=my-session --userspace \
+                       --buffers-pid my-channel
+----
+====
+
+.Create a Linux kernel channel in the current tracing session with four 32-MiB sub-buffers per ring buffer.
+====
+See the option:--num-subbuf and option:--subbuf-size options.
+
+[role="term"]
+----
+$ lttng enable-channel --kernel my-channel \
+                       --num-subbuf=4 --subbuf-size=32M
+----
+====
+
+.Create a user space channel in the current tracing session with trace file rotation.
+====
+See the option:--tracefile-count and option:--tracefile-size options.
+
+[role="term"]
+----
+$ lttng enable-channel --userspace my-channel \
+                       --tracefile-count=16 --tracefile-size=8M
+----
+====
+
+.Enable two user space channels of a specific tracing session.
+====
+[role="term"]
+----
+$ lttng enable-channel --session=my-session --userspace \
+                       canal-d,rds
+----
+====
+
+
 include::common-footer.txt[]
 
 
This page took 0.025463 seconds and 4 git commands to generate.