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 _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev