<div dir="ltr">Hi,<div><br></div><div>That makes complete sense. I was more curious about the sessiond executable. I'm guessing this is something I will have to create along with my build? </div><div><br></div><div>Regards,</div><div>Mosleh</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 2, 2019 at 5:18 PM Jonathan Rajotte-Julien <<a href="mailto:jonathan.rajotte-julien@efficios.com">jonathan.rajotte-julien@efficios.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Apr 02, 2019 at 04:54:00PM -0400, Mosleh Uddin wrote:<br>
> Hello,<br>
> <br>
> Could you give me some more insight into spawning my own sessiond? Sorry<br>
> I'm not completely clear on the topic.<br>
> Thank you for all your assistance.<br>
<br>
Normally lttng-sessiond is treated as a "server/service/daemon" (think http<br>
server as apache) and is *normally* launched as a daemon (systemd/sysVinit) at<br>
boot time.<br>
<br>
Managing manually the lifetime of a lttng-sessiond process is done the same way<br>
as any other process. You can manage it via the command line (./lttng-sessiond), via a<br>
service manager (systemd/upstart etc.) or with a custom service manager (a<br>
python script/c etc.).<br>
<br>
You could spawn a lttng-sessiond from your application with the appropriate<br>
parameters set to isolate it if you need. LTTNG_HOME is an important one. The<br>
output directory also can be manipulated. See man lttng-sessiond for more<br>
details. You will need to manage the process or leave it to a system<br>
administrator and only active tracing when a sessiond is present for example.<br>
<br>
Cheers<br>
<br>
> <br>
> Regards,<br>
> Mosleh<br>
> <br>
> On Wed, Mar 27, 2019 at 1:52 PM Jonathan Rajotte-Julien <<br>
> <a href="mailto:jonathan.rajotte-julien@efficios.com" target="_blank">jonathan.rajotte-julien@efficios.com</a>> wrote:<br>
> <br>
> > Hi Mosleh,<br>
> ><br>
> > On Wed, Mar 27, 2019 at 12:09:54PM -0400, Mosleh Uddin wrote:<br>
> > > Hello,<br>
> > ><br>
> > > Thank you for the quick response. I was able to use the documentation you<br>
> > > provided to start a session and get tracepoint list. I do have some<br>
> > > follow-up questions:<br>
> > ><br>
> > > 1) I needed to create a session daemon before executing my custom<br>
> > > application. In the API I did see functionality to see if a daemon is<br>
> > > active, however, it is possible to spawn a session daemon in my custom<br>
> > app?<br>
> ><br>
> > liblttng-ctl does not expose a lttng-sessiond spawning function since by<br>
> > definition it is a daemon executable (think apache,mysql etc.), you will<br>
> > have to<br>
> > use system/popen/exec.. to spawn the lttng-sessiond process etc. if you<br>
> > want to<br>
> > control its lifetime using your custom application.<br>
> ><br>
> > ><br>
> > > 2) I am able to get a list of active traces lttng can see in userspace, I<br>
> > > enable all the traces and start tracing. The traces however seem to not<br>
> > be<br>
> > > written anywhere on my filesystem. Do I have to specify a location? Or<br>
> > am I<br>
> > > missing something? My current flow is:<br>
> ><br>
> > Please refer to the create command. If outputting locally you will need to<br>
> > pass<br>
> > a "file://...." url to lttng_create_session.<br>
> ><br>
> > You can check on the result for each steps using "lttng list" and "lttng<br>
> > list<br>
> > <session_name>" as you go to troubleshot your setup script.<br>
> ><br>
> > While debugging you can also start the lttng-sessiond in verbose mode to<br>
> > understand what is going on.<br>
> ><br>
> > Also note that you could also use the lttng "load" api if the session you<br>
> > are<br>
> > trying to load is "static" and always the same. You would only need to<br>
> > ship an<br>
> > xml file with your application.<br>
> ><br>
> > Cheers<br>
> ><br>
> > ><br>
> > >    - Creating a session<br>
> > >    - Specifying the domain<br>
> > >    - Creating a handle<br>
> > >    - Creating a channel (with default attributes)<br>
> > >    - Enabling the channel<br>
> > >    - Enabling event (for all traces)<br>
> > >    - Start tracing<br>
> > ><br>
> > > Thanks again for all the assistance.<br>
> > ><br>
> > > Regards,<br>
> > > Mosleh<br>
> > ><br>
> > > On Tue, Mar 26, 2019 at 11:29 AM Jonathan Rajotte-Julien <<br>
> > > <a href="mailto:jonathan.rajotte-julien@efficios.com" target="_blank">jonathan.rajotte-julien@efficios.com</a>> wrote:<br>
> > ><br>
> ><br>
<br>
-- <br>
Jonathan Rajotte-Julien<br>
EfficiOS<br>
</blockquote></div>