[lttng-dev] c/c++ wrappers for lttng commands

Simon Marchi simon.marchi at polymtl.ca
Wed Jan 14 14:24:18 EST 2015


On 14 January 2015 at 14:02, Anand Neeli <anand.neeli at gmail.com> wrote:
> Hi All,
>
> Is there any code (or did anyone implement) c/c++ wrappers API's to
> create,delete, add event to lttng session.
> The conventional way to create, add event, delete lttng sessions is through
> lttng shell commands, i'm looking to do this using a c/c++ API's.
>
> Thanks,
> Anand Neeli

Hi Arnand,

I think you are looking for the liblttng-ctl library.

http://git.lttng.org/?p=lttng-tools.git;a=tree;f=src/lib/lttng-ctl;hb=HEAD

It is the library that the lttng command is based on, but you can also
use it in your program. I don't know if there is an official
documentation, but if you want to know how to do something using the
API, you can always look up the lttng command code and see what it
does.

It is in C, however. If you want to make an wrapper that is more C++
oriented, I am sure it would be a very appreciated contribution :).

Simon



More information about the lttng-dev mailing list