- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly
For automated changes based on OAI PL v1.1:
perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml
The rest (cmake, files with missing license, cmake) manually.
3.7 KiB
OAI gNB LTTng Tracing Setup Guide
Overview
This guide will walk you through setting up tracing for an OpenAirInterface (OAI) gNB (gNodeB) using LTTng (Linux Trace Toolkit Next Generation) and Babeltrace.
What is LTTng and Why Use It?
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.
Prerequisites
- Ubuntu system
Note: only LTTng 2.3.8 is supported.
Building OAI gNB
-
Clean and Build OAI gNB with LTTng:
1.1 Install Dependencies
./build_oai --ninja -I --clean --enable-LTTNG1.2 Build gNB and nrUE
./build_oai --ninja --gNB --nrUE -w SIMU --enable-LTTNG
Setting up 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
Running the gNB
-
Run gNB:
./$binary_path -O $configuration_file PARALLEL_SINGLE_THREAD --rfsimulator.[0].serveraddr server --rfsim -E
Verifying Tracepoints
-
List Active Tracepoints:
sudo lttng list -uPossible 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)
Analyzing Traces
-
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/
-