From b2b69201a5981b4b878a18cffb97de6690851a1f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Mon, 23 Mar 2020 19:12:26 -0400 Subject: [PATCH] Fix: lttng-list: don't warn when the kernel domain has no channels MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Some commands beside lttng-enable-channel have the side-effect of creating a domain. For instance, the lttng-track and lttng-untrack commands will implicitly create their target domains if they don't exist. Thus, it is not unexpected for a domain to exist without channels. Currently, tracking process attributes in the user space and kernel domains will result in a warning being printed when lttng-status (or lttng-list `the_session`) is invoked. Example output: Tracing session arielle_bolduc: [inactive] Trace output: /home/jgalar/lttng-traces/arielle_bolduc-20200323-191128 === Domain: Linux kernel === Tracked process attributes Process IDs: all Virtual Process IDs: 12365, 526, 41 User IDs: all Virtual User IDs: all Group IDs: all Virtual Group IDs: all Warning: No kernel channel === Domain: User space === Buffering scheme: per-user Tracked process attributes Virtual Process IDs: 12365, 526, 41 Virtual User IDs: all Virtual Group IDs: all The warning is removed since it can only confuse users. Signed-off-by: Jérémie Galarneau Change-Id: I733ee6c3d8c1d297194842c7bdbdf3f237661e51 --- src/bin/lttng/commands/list.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index 0a770187a..b4a9c29f0 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -1369,7 +1369,6 @@ static int list_channels(const char *channel_name) count = 0; } else { ret = CMD_SUCCESS; - WARN("No kernel channel"); goto error_channels; } break; -- 2.34.1