From 2f785fe7ec15872168aeff467103d3b39c02a46c Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 22 May 2014 15:43:47 -0400 Subject: [PATCH] Add live timer and tracefile count/size to list The live timer interval is session wide where the trace file count/size is per channel. Fixes #642 Signed-off-by: David Goulet --- src/bin/lttng-sessiond/cmd.c | 2 ++ src/bin/lttng/commands/list.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index bb9329f30..eb516d3b1 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -166,6 +166,8 @@ static void list_lttng_channels(int domain, struct ltt_session *session, channels[i].attr.read_timer_interval = uchan->attr.read_timer_interval; channels[i].enabled = uchan->enabled; + channels[i].attr.tracefile_size = uchan->tracefile_size; + channels[i].attr.tracefile_count = uchan->tracefile_count; switch (uchan->attr.output) { case LTTNG_UST_MMAP: default: diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index f69b3ba3d..08518dc0c 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -645,6 +645,8 @@ static void print_channel(struct lttng_channel *channel) MSG("%snumber of subbufers: %" PRIu64, indent6, channel->attr.num_subbuf); MSG("%sswitch timer interval: %u", indent6, channel->attr.switch_timer_interval); MSG("%sread timer interval: %u", indent6, channel->attr.read_timer_interval); + MSG("%strace file count: %" PRIu64, indent6, channel->attr.tracefile_count); + MSG("%strace file size (bytes): %" PRIu64, indent6, channel->attr.tracefile_size); switch (channel->attr.output) { case LTTNG_EVENT_SPLICE: MSG("%soutput: splice()", indent6); @@ -756,7 +758,9 @@ static int list_sessions(const char *session_name) MSG("Tracing session %s: [%s%s]", session_name, active_string(sessions[i].enabled), snapshot_string(sessions[i].snapshot_mode)); - MSG("%sTrace path: %s\n", indent4, sessions[i].path); + MSG("%sTrace path: %s", indent4, sessions[i].path); + MSG("%sLive timer interval (usec): %u\n", indent4, + sessions[i].live_timer_interval); break; } } else { -- 2.34.1