This guide will walk you through setting up tracing for an OpenAirInterface (OAI) gNB (gNodeB) using LTTng (Linux Trace Toolkit Next Generation) and Babeltrace.
LTTng, or Linux Trace Toolkit Next Generation, is a powerful logging framework designed for Linux systems. It provides low-overhead tracing capabilities, allowing developers to monitor and analyze system behavior in real-time without significant performance impact. LTTng offers several advantages:
Low Overhead: LTTng introduces minimal overhead to the system, making it suitable for use in production environments without affecting system performance.
Customizable: LTTng allows users to define custom tracepoints in their applications, providing fine-grained control over what events to trace and collect.
Scalability: It can scale to large distributed systems, making it suitable for tracing complex software stacks across multiple nodes.
Note: only LTTng 2.3.8 is supported.
Clean and Build OAI gNB with LTTng:
1.1 Install Dependencies
./build_oai --ninja -I --clean --enable-LTTNG
1.2 Build gNB and nrUE
./build_oai --ninja --gNB --nrUE -w SIMU --enable-LTTNG
Start LTTng Session and Relay:
sudo lttng-sessiond -d
sudo lttng-relayd -d
Create Live LTTng Session:
sudo lttng create my-session --live --set-url=net://127.0.0.1
Enable gNB Trace Events:
sudo lttng enable-event --userspace OAI:gNB
Start LTTng Tracing:
sudo lttng start
Run gNB:
./$binary_path -O $configuration_file PARALLEL_SINGLE_THREAD --rfsimulator.serveraddr server --rfsim -E
List Active Tracepoints:
sudo lttng list -u
Possible Output:
UST events:
-------------
PID: 1154722 - Name: /home/firecell/Desktop/FirecellRepos/firecellrd-oai5g-ran/cmake_targets/ran_build/build/nr-softmodem
OAI:gNB (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
Install Babeltrace:
sudo apt-get install babeltrace
Capture Trace Logs Live:
To learn the full path of the trace session:
babeltrace --input-format=lttng-live net://localhost
Trace logs using the full path:
babeltrace --input-format=lttng-live net://localhost/host/firecell-XPS-15-9530/my-session
Possible Output:
[19:35:32.181608002] (+2.664882127) firecell-XPS-15-9530 OAI:gNB: { cpu_id = 10 }, { MODNAME = "OAI-NR_MAC info", EVENTID = -1, SFN = -1, SLOT = -1, FUNCTION = "gNB_dlsch_ulsch_scheduler", LINE = 246, MSG = "Frame.Slot 0.0\n" }
Capture Trace Logs Offline:
Create an offline trace session with a specified output directory:
sudo lttng create offline_session --output=/home/trace_offline/
Enable gNB trace events:
sudo lttng enable-event --userspace OAI:gNB
Start capturing trace logs:
sudo lttng start
Stop the trace capture:
sudo lttng stop
Destroy the trace session:
sudo lttng destroy
Use Babeltrace to analyze the captured trace logs:
sudo babeltrace /home/trace_offline/
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )