[lttng-dev] [PATCH lttng-modules] Container support for lttng-logger

St├ęphane Graber stgraber at ubuntu.com
Tue Dec 19 20:55:06 UTC 2017


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" }


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



More information about the lttng-dev mailing list