[lttng-dev] Notification event from lttng-relayd on trace rotation completion?
Jérémie Galarneau
jeremie.galarneau at efficios.com
Fri Apr 20 14:58:27 EDT 2018
On 10 April 2018 at 10:56, Christoffer Ahlbin <Christoffer.Ahlbin at sinch.com>
wrote:
> What is the recommended approach to have an external process notified
> that a trace session rotation has completed on the lttng-relayd end?
>
> I'm trying out the trace rotation functionality available in 2.11
> (pre-release) and will be running a trace session inside a Linux
> container (userspace tracepoints only), and running lttng-relayd on
> the container host. I would then like to have a third process, a
> "collector"-like process, that will also be running on the container
> host and will have the responsibility of collecting completeted trace
> chunks (i.e. rotated chunks) and push them further along into a trace
> analysis pipeline.
>
> So far I've looked at using inotify to watch the lttng-traces/
> directory, and the idea would be to infer a trace rotation based on
> that the destination directories post rotation are named on the format
> "%Y%m%dT%H%M%S%z-%Y%m%dT%H%M%S%z-<seqno>". But I'm not entirely
> satisifed with that approach. Ideally I would be able to be notified
> more explicitly that a rotation completed.
>
Hi Christopher,
There is a notification mechanism available on the target side (sessiond and
consumerd) to which I'm adding notifications for ongoing and completed
notifications.
Unfortunately, those notifications are not forwarded over the network
to the relay daemon. It would be nice to extend the notification
system for that kind of use case.
In the short term, monitoring with inotify for new folders with the
format you mentioned is pretty much the only mechanism we have if
you can't monitor for notifications on the target.
In the current master branch, there is a bug that can cause the
relayd to rename the completed chunk too soon while it is
still being written. In this case, you could fail to read the trace.
We are working on a fix at the moment, so the inotify approach
should be safe by the time of the release. Did you observe other
problems using inotify?
Thanks!
Jérémie
>
>
> Any thoughts and recommendations are most welcome.
>
> Thanks
>
> Christoffer Ahlbin
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20180420/3af8e30f/attachment.html>
More information about the lttng-dev
mailing list