Initial import
[lttng-docs.git] / contents / using-lttng / instrumenting / proc-lttng-logger-abi.md
CommitLineData
5e0cbfb0
PP
1---
2id: proc-lttng-logger-abi
3---
4
5The `lttng-tracer` Linux kernel module, installed by the LTTng-modules
6package, creates a special LTTng logger ABI file `/proc/lttng-logger`
7when loaded. Writing text data to this file generates an LTTng kernel
8domain event named `lttng_logger`.
9
10Unlike other kernel domain events, `lttng_logger` may be enabled by
11any user, not only root users or members of the tracing group.
12
13To use the LTTng logger ABI, simply write a string to
14`/proc/lttng-logger`:
15
16<pre class="term">
17echo -n 'Hello, World!' > /proc/lttng-logger
18</pre>
19
20The `msg` field of the `lttng_logger` event contains the recorded
21message.
22
23<div class="tip">
24<p>
25 <span class="t">Note:</span>Messages are split in chunks of
26 1024&nbsp;bytes.
27</p>
28</div>
29
30The LTTng logger ABI is a quick and easy way to trace some events from
31user space through the kernel tracer. However, it is much more basic
32than LTTng-UST: it's slower (involves system call round-trip to the
33kernel and only supports logging strings). The LTTng logger ABI is
34particularly useful for recording logs as LTTng traces from shell
35scripts, potentially combining them with other Linux kernel/user space
36events.
This page took 0.026114 seconds and 4 git commands to generate.