From bbd159dcdfa9b16ac303f579a61d3e173b62e705 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Mon, 17 May 2021 17:39:12 -0400 Subject: [PATCH] lttng-enable-channel(1): add usage examples MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau Change-Id: I26bcfed2b6d71b0bbc2fa89d33f37925c303c91c --- doc/man/lttng-enable-channel.1.txt | 62 +++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/doc/man/lttng-enable-channel.1.txt b/doc/man/lttng-enable-channel.1.txt index c16051dfa..6c1091ec1 100644 --- a/doc/man/lttng-enable-channel.1.txt +++ b/doc/man/lttng-enable-channel.1.txt @@ -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 <> 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[] -- 2.34.1