[lttng-dev] health check and relaunch of lttng daemons

David Goulet dgoulet at efficios.com
Thu Oct 23 09:24:51 EDT 2014

On 23 Oct (12:37:40), Anand Neeli wrote:
> Hi All,
> I have few queries related to notifications when lttng daemons die and
> their spawning and health-check
> - When relayd dies then sessiond gets error of connection reset, but it
> doesnt try to reconnect to relayd again. It just lies on system without
> being functional.
> - on a system with multiple nodes, relayd can be spawned on any node. Is
> there a way for the sessiond to discover or get relayd IP-address. (Again
> in case relayd dies and gets spawned on different node, then sessiond has
> to discover and re-connect)

No there is no discovery mechanism of relayd. I know that it has been
worked on a while ago but was more of a school project.

> - How is the health_check used. Is it deprecated? coz in lttng.h i see
> extern LTTNG_DEPRECATED("This call is now obsolete.")
> int lttng_health_check(enum lttng_health_component c);

Please see lttng/health.h for the API.

> If health_check can be used for relayd and sessiond?
> Can anyone provide more pointers or example code for health check?

It can be used on the three daemon we have, sessiond, consumerd and
relayd. A good example would be the health test that you can find here:


> - it becomes really important to get notification/signal from relayd, so
> that software can be added to respawn sessiond.
> please let me know if there is anyway of doing this.

Not sure to fully understand what you want here. You are looking for a
way to detect relayd health so you can respawn a sessiond?

Note that if the relayd dies, the current session using it will NOT try
to reconnect. However, if you create a new session on the sessiond with
a URL pointing to a working relayd, everything should work. No need to
respawn a sessiond. You can simply destroy the session for which the
relayd died and create a new one with the new URL.


> Thanks,
> Anand Neeli
> On Tue, Oct 21, 2014 at 12:10 AM, Anand Neeli <anand.neeli at gmail.com> wrote:
> > one more point:
> > if there is a way to kill/exit sessiond on a connection reset then will be
> > easier to re-launch it again
> >
> > wondering if anything of that sort can be done
> >
> > Thanks,
> > Anand Neeli
> >
> > On Tue, Oct 21, 2014 at 12:02 AM, Anand Neeli <anand.neeli at gmail.com>
> > wrote:
> >
> >> Hi All,
> >> if relayd gets killed i see there is connection reset which happens at
> >> client.
> >> Is there a way to relaunch the sessiond/consumerd on a connection reset?
> >>
> >> can some hooks be added or helper application be written to relaunch
> >> sessiond in case exit of relayd or any other connection reset?
> >>
> >> Thanks,
> >> Anand Neeli
> >>
> >
> >

> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: Digital signature
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20141023/59968f35/attachment-0001.sig>

More information about the lttng-dev mailing list