[lttng-dev] Creating custom application
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
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
> > 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
> > understand how I can approach creating a session and implementing the
> > functionalities that commands like (lttng-sessiond, lttng create and
> > start) provide. Thank you for any information.
> Note that lttng-sessiond can be started with a specific group id for
> purpose that allow only users of the group to control it. From there you
> 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 .
> The best documentation on how to use this API is the headers  and the
> line client implementation .
>  https://github.com/lttng/lttng-tools/tree/master/include/lttng
>  https://github.com/lttng/lttng-tools/tree/master/src/bin/lttng
> Let us know how it goes.
> Jonathan Rajotte-Julien
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lttng-dev