[lttng-dev] [PATCH lttng-modules] Container support for lttng-logger
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Tue Dec 19 21:03:29 UTC 2017
----- On Dec 19, 2017, at 3:55 PM, Stéphane Graber stgraber at ubuntu.com wrote:
> This adds a new /dev/lttng-logger interface to make it easy for
> containers to write to the lttng logger.
>
> root at vm10:~/lttng-modules# ls -lh /dev/lttng-logger
> crw-rw-rw- 1 root root 10, 54 Dec 19 20:39 /dev/lttng-logger
> root at vm10:~/lttng-modules# ls -lh /proc/lttng-logger
> -rw-rw-rw- 1 root root 0 Dec 19 20:39 /proc/lttng-logger
>
> root at vm10:~/lttng-modules# lxc config device add test lttng unix-char
> path=/dev/lttng-logger
> Device lttng added to test
>
> root at vm10:~/lttng-modules# echo host-dev > /dev/lttng-logger
> root at vm10:~/lttng-modules# echo host-proc > /proc/lttng-logger
> root at vm10:~/lttng-modules# lxc exec test bash
> root at test:~# echo container-dev > /dev/lttng-logger
>
> [20:42:56.627719300] (+?.?????????) vm10 lttng_logger: { cpu_id = 4 }, {
> _msg_length = 9, msg = "host-dev" }
> [20:42:58.145960910] (+1.518241610) vm10 lttng_logger: { cpu_id = 4 }, {
> _msg_length = 10, msg = "host-proc" }
> [20:43:01.123842390] (+2.977881480) vm10 lttng_logger: { cpu_id = 3 }, {
> _msg_length = 14, msg = "container-dev" }
It's great! The code looks good. The only thing missing before I can merge this
is adding tests under the lttng-tools tests/ directory.
Thanks,
Mathieu
>
>
> Stéphane Graber (1):
> Add a new /dev/lttng-logger interface
>
> probes/lttng.c | 26 ++++++++++++++++++++++++--
> 1 file changed, 24 insertions(+), 2 deletions(-)
>
> --
> 2.14.1
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list