[lttng-dev] Tracing directly into shared memory

Schickentanz, Thomas thomas.schickentanz at harman.com
Mon Mar 4 04:28:00 EST 2019


Hi all,

My idea is to pre-allocate memory on system startup which can later be used by lttng for tracing. It should work like flight recorder mode without extracting data from ringbuffers to trace file while recording data. Data extraction of shm ringbuffers should be done when recording has been finished.
As per documention with option `--shm-path' ringbuffer for tracing can be created in shared memory. With lttng-crash data can be extracted from ringbuffer.
Can this option be used with shared memory in volatile memory (default ram), too? And is it possible to record kernel space traces with this option?
I tried

lttng create testshm --shm-path=/dev/shm --snapshot
lttng enable-channel c0 -s testshm -k
lttng enable-event -s testshm -c c0 -k -a
lttng start
lttng stop
lttng-crash -extract=/home/test /dev/shm

With lttng and lttng-crash everything seems to work fine (no error messages).
However the extract folder keeps empty.
Has someone researched into this option and can help to clarify the points?

Thanks,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20190304/5f9769b0/attachment.html>


More information about the lttng-dev mailing list