
1. 개요
LTTng : The Linux Trace Toolkit: next generation
LTTng를 사용하여 tracing 하면 trace 데이터의 용량이 매우 큰 것을 볼 수 있다. 따라서 Embeded Device 에 사용하기 위해선 remote로 저장하는 방법이 필요한데 이를 위한 방법을 공유하고자 한다.
Target에서는 lttng를 실행하되 --output이 아닌 --set-url을 통해 remote로 전송할 위치를 설정하며 Host에서는 lttng-relayd daemon에서 전송되는 data를 수신한다.
2. LTTng remotly tracing
2.1 lttng-relayd 실행 on Host
~$ lttng-relayd
수신한 데이터는 default로 $LTTNG_HOME/lttng-traces/HOSTNAME/SESSION/DOMAIN 에 생성되며 -o, --output 옵션으로 위치를 지정할 수 있다.
2.2 lttng session 생성 on Target
Session 시작 시 --set-url 옵션만 다를 뿐 동일하다.
lttng create my --set-url=net://192.168.0.185
lttng enable-event --kernel --all
lttng start
Session 종료 시에도 동일하다.
lttng stop
lttng destory
2.3 Result

매 Session마다 새로 생성되며 lttng 데이터가 저장되는 것을 볼 수 있다.
3. Reference
LTTng v2.12 — LTTng Documentation — LTTng
LTTng 2.12 documentation
lttng.org
lttng.org/blog/2016/03/07/tutorial-remote-tracing/
Tutorial: Remotely tracing an embedded Linux system — LTTng
Learn how to remotely trace GPIO button pushes on a BeagleBone Black with the help of LTTng's relay daemon.
lttng.org
lttng.org/man/8/lttng-relayd/v2.7/
lttng-relayd(8) [v2.7] — LTTng
The LTTng project aims at providing highly efficient tracing tools for Linux. It's tracers help tracking down performance issues and debugging problems involving multiple concurrent processes and threads. Tracing across multiple systems is also possible. T
lttng.org
3 Basic Usage (with examples) for each of the Yocto Tracing Tools — The Yocto Project ® dev documentation
Notice that there are a lot of events that don’t really have anything to do with what we’re interested in, namely events that schedule ‘perf’ itself in and out or that wake perf up. We can get rid of those by using the ‘–filter’ option - for
docs.yoctoproject.org