<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><br></div><div><span id="zwchr" data-marker="__DIVIDER__">----- On Nov 6, 2015, at 4:09 PM, Mike <melon.aerial@gmail.com> wrote:<br></span></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div style="font-size:12.8000001907349px">Hello.<br></div><span style="font-size:12.8000001907349px">I'd like to use your library for ring buffers between kernel and userspace. I'd found that this library is in lttng-modules repo on github. But i haven't found any examples of codes in docs. I just want to use this libray. Have u got some easy example of using it or maybe u can say what files in repo ot watch to faster understand how it works?</span><br></div></blockquote><div><br></div><div><div>Hi Mike,</div><div><br data-mce-bogus="1"></div><div>I'll reply to your private email questions below the lttng-dev thread, since there<br></div><div>appears to be more questions than initially posted in the lttng-dev email.<br></div><div><br></div><div><span id="zwchr" data-marker="__DIVIDER__">----- On Nov 13, 2015, at 10:05 AM, Mike <melon.aerial@gmail.com> wrote:<br></span></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div dir="ltr"><div><div><div>Hello.<br></div>I've tried to send to mail-list. but i haven't received any answer.</div></div></div></blockquote><div>We've been busy with a workshop last week, hence the delayed answers.<br></div><div><br></div><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div dir="ltr"><div><div>So you are the mainterner of github repo, that' why i'm writing you. So the first question about documentation about "Generic Ring Buffer Library". I've been searching internet and haven't found it.</div></div></div></blockquote><div>The generic ring buffer library was initially created as a library (modules)</div><div>for the Linux kernel. Its github repo can be found here:<br></div><div>https://github.com/compudj/linux-libringbuffer/commits/tip-current-ringbuffer-0.240</div><div><br></div><div>However, it's not actively maintained, and the updated libringbuffer code for</div><div>the Linux kernel now sits in lttng-modules under /lib/. There are a few commits</div><div>of lib ring buffer clients examples that were never integrated from the ringbuffer</div><div>github repo to lttng-modules though.</div><div><br></div><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div dir="ltr"><div><div>Also i've seen code on github, understand it a little bit. But i haven't found and client code there, only kernel one.</div></div></div></blockquote><div>The lib ring buffer "client" code is actually a in-kernel "client" of the library.<br></div><div>A ring buffer "client" selects a ring buffer configuration, and chooses the<br></div><div>data layout in the ring buffer. It also implements the userspace-visible interfaces</div><div> to read from the ring buffer.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div dir="ltr"><div><div>i'd like to use library for interaction from kernel-space to user-space. Is it for it?</div></div></div></blockquote><div>No. The in-kernel library has in-kernel clients, and interfaces to read the buffer<br></div><div>content from user-space, but user-space cannot write into the kernel buffers.</div><div><br></div><div>I also did a port of libringbuffer from lttng-modules into lttng-ust, the lttng</div><div>user-space tracer. However, this is only for writing into the buffer from</div><div>user-space, not from the kernel. Reading the buffers is done by a user-space</div><div>consumer daemon.</div><div><br></div><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div dir="ltr"><div><div>Or i've unserstood something wrong maybe. Also another question about LTTng. I've seen that is a big framework, but i'm only need to trace system calls. Can i use it with tracing only system calls?</div></div></div></blockquote><div>Yes, you can use it to trace only syscalls. You will need lttng-tools</div><div>and lttng-modules, and do<br></div><div><br></div><div>(as root)</div><div>lttng-sessiond -d</div><div><br></div><div>(as root or user part of the tracing group)</div><div>lttng create</div><div>lttng enable-event --syscall '*'</div><div>lttng start</div><div>[....]</div><div>lttng stop</div><div>lttng view</div><div><br></div><div>more details at http://lttng.org/docs</div><div><br></div><div>You can replace '*' with e.g. 'open' or 'op*'. The wildcard needs to be</div><div>at the end of the string.</div><div><br></div><blockquote style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;" data-mce-style="border-left: 2px solid #1010FF; margin-left: 5px; padding-left: 5px; color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><div dir="ltr"><div><div>And if i can, where it is usually save logs? Have it got any parameters for that or maybe u can say where i can find it it code, cause it will really help me.</div></div></div></blockquote><div><br></div><div>$HOME/lttng-traces/</div><div><br></div><div>It can be changed by passing parameters to lttng create. See manpages or website doc.</div></div><div data-marker="__QUOTED_TEXT__">Thanks,</div><div data-marker="__QUOTED_TEXT__"><br></div><div data-marker="__QUOTED_TEXT__">Mathieu</div><div data-marker="__QUOTED_TEXT__"><br></div></div><div><br data-mce-bogus="1"></div></div><div data-marker="__SIG_POST__">-- <br></div><div>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com</div></div></body></html>