LTTng logger ABI
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 15 Feb 2014 21:59:09 +0000 (16:59 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 11 Mar 2014 01:23:39 +0000 (21:23 -0400)
Add a user-space ABI (new file /proc/lttng-logger) to lttng-modules
which can be written into by any user on the system. The content is
saved into the kernel trace stream into the "lttng_logger" kernel event.

The content of a single write is written into an lttng_logger event.
The write count is truncated to 1024 bytes (if larger), which is much
smaller than the smallest subbuffer size available (4096 bytes). This
ensures all written data makes it into the active tracing buffers.

Example use:

lttng-sessiond -d # (as root)
lttng create
lttng enable-event -k lttng_logger
lttng start

echo -n "this is a test" > /proc/lttng-logger

lttng stop
lttng view

Example result:

[17:00:04.251970425] (+179.750663203) thinkos lttng_logger: { cpu_id = 3 }, { _msg_length = 14, msg = "this is a test" }

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Karim Yaghmour <karim.yaghmour@opersys.com>

No differences found
This page took 0.028777 seconds and 4 git commands to generate.