<div dir="ltr">Hello,<div><br></div><div>Thank you for the quick response. I was able to use the documentation you provided to start a session and get tracepoint list. I do have some follow-up questions:</div><div><br></div><div>1) I needed to create a session daemon before executing my custom application. In the API I did see functionality to see if a daemon is active, however, it is possible to spawn a session daemon in my custom app?</div><div><br></div><div>2) I am able to get a list of active traces lttng can see in userspace, I enable all the traces and start tracing. The traces however seem to not be written anywhere on my filesystem. Do I have to specify a location? Or am I missing something? My current flow is:</div><div><ul><li>Creating a session</li><li>Specifying the domain</li><li>Creating a handle</li><li>Creating a channel (with default attributes)</li><li>Enabling the channel</li><li>Enabling event (for all traces)</li><li>Start tracing</li></ul><div>Thanks again for all the assistance.</div></div><div><br></div><div>Regards,</div><div>Mosleh</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 26, 2019 at 11:29 AM 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">Hi Mosleh,<br>
<br>
On Tue, Mar 26, 2019 at 11:11:41AM -0400, Mosleh Uddin wrote:<br>
> Hi all,<br>
> <br>
> I am working with an embedded system and for security purposes I don't<br>
> necessarily want the user to have the ability to execute lttng commands<br>
> (lttng-sessiond, lttng create, etc.). In order to create a session/start I<br>
> am creating a custom application which will communicate through my<br>
> application via a socket. This way my application only control lttng<br>
> functionalities.<br>
> <br>
> I was wondering if you guys can direct me to some documentation where I can<br>
> understand how I can approach creating a session and implementing the<br>
> functionalities that commands like (lttng-sessiond, lttng create and lttng<br>
> start) provide. Thank you for any information.<br>
<br>
Note that lttng-sessiond can be started with a specific group id for "control"<br>
purpose that allow only users of the group to control it. From there you could<br>
have a simple popen based custom application that run the cli client. There are<br>
multiple ways to achieve what you are looking for.<br>
<br>
We also expose an API/lib (liblttng-ctl) to talk to the sessiond [1].<br>
<br>
The best documentation on how to use this API is the headers [1] and the command<br>
line client implementation [3].<br>
<br>
[1] <a href="https://github.com/lttng/lttng-tools/tree/master/include/lttng" rel="noreferrer" target="_blank">https://github.com/lttng/lttng-tools/tree/master/include/lttng</a><br>
[2] <a href="https://github.com/lttng/lttng-tools/tree/master/src/bin/lttng" rel="noreferrer" target="_blank">https://github.com/lttng/lttng-tools/tree/master/src/bin/lttng</a><br>
    <a href="https://github.com/lttng/lttng-tools/tree/master/src/bin/lttng/commands" rel="noreferrer" target="_blank">https://github.com/lttng/lttng-tools/tree/master/src/bin/lttng/commands</a><br>
<br>
Let us know how it goes.<br>
<br>
Cheers<br>
<br>
-- <br>
Jonathan Rajotte-Julien<br>
EfficiOS<br>
</blockquote></div>