[lttng-dev] Creating custom application

Mosleh Uddin mosleh1235 at gmail.com
Wed Mar 27 12:09:54 EDT 2019


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:

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?

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:

   - Creating a session
   - Specifying the domain
   - Creating a handle
   - Creating a channel (with default attributes)
   - Enabling the channel
   - Enabling event (for all traces)
   - Start tracing

Thanks again for all the assistance.


On Tue, Mar 26, 2019 at 11:29 AM Jonathan Rajotte-Julien <
jonathan.rajotte-julien at efficios.com> wrote:

> Hi Mosleh,
> On Tue, Mar 26, 2019 at 11:11:41AM -0400, Mosleh Uddin wrote:
> > Hi all,
> >
> > I am working with an embedded system and for security purposes I don't
> > necessarily want the user to have the ability to execute lttng commands
> > (lttng-sessiond, lttng create, etc.). In order to create a session/start
> I
> > am creating a custom application which will communicate through my
> > application via a socket. This way my application only control lttng
> > functionalities.
> >
> > I was wondering if you guys can direct me to some documentation where I
> can
> > understand how I can approach creating a session and implementing the
> > functionalities that commands like (lttng-sessiond, lttng create and
> lttng
> > start) provide. Thank you for any information.
> Note that lttng-sessiond can be started with a specific group id for
> "control"
> purpose that allow only users of the group to control it. From there you
> could
> have a simple popen based custom application that run the cli client.
> There are
> multiple ways to achieve what you are looking for.
> We also expose an API/lib (liblttng-ctl) to talk to the sessiond [1].
> The best documentation on how to use this API is the headers [1] and the
> command
> line client implementation [3].
> [1] https://github.com/lttng/lttng-tools/tree/master/include/lttng
> [2] https://github.com/lttng/lttng-tools/tree/master/src/bin/lttng
> https://github.com/lttng/lttng-tools/tree/master/src/bin/lttng/commands
> Let us know how it goes.
> Cheers
> --
> Jonathan Rajotte-Julien
> EfficiOS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20190327/cd378feb/attachment.html>

More information about the lttng-dev mailing list