Uniformize the printing of units in session listing
[lttng-tools.git] / src / bin / lttng / commands / list.c
index c1f91d13546fe5264f4dad3bb89689ee257fd5cd..8705a4446ae7c446959e3dbc107245601d5c9e94 100644 (file)
@@ -42,6 +42,12 @@ const char *indent4 = "    ";
 const char *indent6 = "      ";
 const char *indent8 = "        ";
 
+#ifdef LTTNG_EMBED_HELP
+static const char help_msg[] =
+#include <lttng-list.1.h>
+;
+#endif
+
 enum {
        OPT_HELP = 1,
        OPT_USERSPACE,
@@ -1167,6 +1173,7 @@ static void print_channel(struct lttng_channel *channel)
 {
        int ret;
        uint64_t discarded_events, lost_packets, monitor_timer_interval;
+       int64_t blocking_timeout;
 
        ret = lttng_channel_get_discarded_event_count(channel,
                        &discarded_events);
@@ -1189,17 +1196,25 @@ static void print_channel(struct lttng_channel *channel)
                return;
        }
 
+       ret = lttng_channel_get_blocking_timeout(channel,
+                       &blocking_timeout);
+       if (ret) {
+               ERR("Failed to retrieve blocking timeout of channel");
+               return;
+       }
+
        MSG("- %s:%s\n", channel->name, enabled_string(channel->enabled));
 
        MSG("%sAttributes:", indent4);
        MSG("%soverwrite mode: %d", indent6, channel->attr.overwrite);
-       MSG("%ssubbuffers size: %" PRIu64, indent6, channel->attr.subbuf_size);
+       MSG("%ssubbuffers size: %" PRIu64 " bytes", indent6, channel->attr.subbuf_size);
        MSG("%snumber of subbuffers: %" 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("%smonitor timer interval: %" PRIu64, indent6, monitor_timer_interval);
+       MSG("%sswitch timer interval: %u µs", indent6, channel->attr.switch_timer_interval);
+       MSG("%sread timer interval: %u µs", indent6, channel->attr.read_timer_interval);
+       MSG("%smonitor timer interval: %" PRIu64 " µs", indent6, monitor_timer_interval);
+       MSG("%sblocking timeout: %" PRId64 " µs", indent6, blocking_timeout);
        MSG("%strace file count: %" PRIu64, indent6, channel->attr.tracefile_count);
-       MSG("%strace file size (bytes): %" PRIu64, indent6, channel->attr.tracefile_size);
+       MSG("%strace file size: %" PRIu64 " bytes", indent6, channel->attr.tracefile_size);
        MSG("%sdiscarded events: %" PRIu64, indent6, discarded_events);
        MSG("%slost packets: %" PRIu64, indent6, lost_packets);
        switch (channel->attr.output) {
This page took 0.023684 seconds and 4 git commands to generate.