Expose monitor timer interval to lttngctl and client
[lttng-tools.git] / src / common / mi-lttng.c
index e87e767c56a2a686929a7f752418cff5369b63dd..197add2d470518bf0e18f4f2ecc16320d8a88265 100644 (file)
@@ -862,7 +862,7 @@ int mi_lttng_channel_attr(struct mi_writer *writer,
        int ret = 0;
        struct lttng_channel *chan = caa_container_of(attr,
                        struct lttng_channel, attr);
-       uint64_t discarded_events, lost_packets;
+       uint64_t discarded_events, lost_packets, monitor_timer_interval;
 
        assert(attr);
 
@@ -876,6 +876,12 @@ int mi_lttng_channel_attr(struct mi_writer *writer,
                goto end;
        }
 
+       ret = lttng_channel_get_monitor_timer_interval(chan,
+                       &monitor_timer_interval);
+       if (ret) {
+               goto end;
+       }
+
        /* Opening Attributes */
        ret = mi_lttng_writer_open_element(writer, config_element_attributes);
        if (ret) {
@@ -922,6 +928,14 @@ int mi_lttng_channel_attr(struct mi_writer *writer,
                goto end;
        }
 
+       /* Monitor timer interval in usec */
+       ret = mi_lttng_writer_write_element_unsigned_int(writer,
+               config_element_monitor_timer_interval,
+               monitor_timer_interval);
+       if (ret) {
+               goto end;
+       }
+
        /* Event output */
        ret = mi_lttng_writer_write_element_string(writer,
                config_element_output_type,
This page took 0.023046 seconds and 4 git commands to generate.