Add tracer to record configured events to database This extends the functionality provided by record in that it allows collection of data into a Clickhouse database, allowing aggregation of data from gNB and UE for functions like channel estimation for PUSCH transmissions that did not decode successfully at the gNB. It is intended to be used in conjunction with Aerial Data Lake but is not limited to it. Data access is simpler than in !3462 (merged), but could be improved using the metadata approach from !3462 (merged). Usage is similar to the exsting record tracer: docker exec -it oai-nr-ue bash -c "record_db -on UE -off VCD -ch-droptables -off UE_PHY_UL_TICK -off UE_PHY_DL_TICK -off UE_PHY_PDSCH_IQ" Which outputs recorded data every 5 seconds: 17:35:40.945037 record_db.cpp:570 INF[main ] Initialized buffer for event_id:21 name:UE_PHY_INITIATE_RA_PROCEDURE has_frame_slot:false columns:5 17:35:40.945924 record_db.cpp:570 INF[main ] Initialized buffer for event_id:26 name:NRUE_PHY_MIB has_frame_slot:true columns:6 17:35:40.946717 record_db.cpp:570 INF[main ] Initialized buffer for event_id:53 name:NRUE_MAC_DL_PDU_WITH_DATA has_frame_slot:true columns:7 17:35:40.947467 record_db.cpp:570 INF[main ] Initialized buffer for event_id:54 name:NRUE_MAC_UL_PDU_WITH_DATA has_frame_slot:true columns:7 17:35:40.948208 record_db.cpp:570 INF[main ] Initialized buffer for event_id:55 name:NRUE_MAC_DL_RAR_PDU_WITH_DATA has_frame_slot:true columns:6 17:35:40.948912 record_db.cpp:570 INF[main ] Initialized buffer for event_id:318 name:UE_MASTER_TICK has_frame_slot:true columns:5 17:35:40.949679 record_db.cpp:570 INF[main ] Initialized buffer for event_id:321 name:UE_PHY_DLSCH_UE_DCI has_frame_slot:true columns:10 17:35:40.950397 record_db.cpp:570 INF[main ] Initialized buffer for event_id:322 name:UE_PHY_DLSCH_UE_ACK has_frame_slot:true columns:7 17:35:40.951125 record_db.cpp:570 INF[main ] Initialized buffer for event_id:323 name:UE_PHY_DLSCH_UE_NACK has_frame_slot:true columns:7 17:35:40.951903 record_db.cpp:570 INF[main ] Initialized buffer for event_id:324 name:UE_PHY_ULSCH_UE_DCI has_frame_slot:true columns:12 17:35:40.952604 record_db.cpp:570 INF[main ] Initialized buffer for event_id:325 name:UE_PHY_ULSCH_UE_ACK has_frame_slot:true columns:7 17:35:40.953305 record_db.cpp:570 INF[main ] Initialized buffer for event_id:326 name:UE_PHY_ULSCH_UE_NACK has_frame_slot:true columns:7 17:35:40.954035 record_db.cpp:570 INF[main ] Initialized buffer for event_id:327 name:UE_PHY_INPUT_SIGNAL has_frame_slot:true columns:7 17:35:40.954778 record_db.cpp:570 INF[main ] Initialized buffer for event_id:328 name:UE_PHY_DL_CHANNEL_ESTIMATE has_frame_slot:true columns:8 17:35:40.955533 record_db.cpp:570 INF[main ] Initialized buffer for event_id:329 name:UE_PHY_DL_CHANNEL_ESTIMATE_FREQ has_frame_slot:true columns:8 17:35:40.956250 record_db.cpp:570 INF[main ] Initialized buffer for event_id:330 name:UE_PHY_PDCCH_IQ has_frame_slot:false columns:5 17:35:40.957010 record_db.cpp:570 INF[main ] Initialized buffer for event_id:331 name:UE_PHY_PDCCH_ENERGY has_frame_slot:true columns:9 17:35:40.957781 record_db.cpp:570 INF[main ] Initialized buffer for event_id:333 name:UE_PHY_PDSCH_ENERGY has_frame_slot:true columns:9 17:35:40.958599 record_db.cpp:570 INF[main ] Initialized buffer for event_id:334 name:UE_PHY_PUSCH_TX_POWER has_frame_slot:true columns:10 17:35:40.959364 record_db.cpp:570 INF[main ] Initialized buffer for event_id:335 name:UE_PHY_PUCCH_TX_POWER has_frame_slot:true columns:9 17:35:40.960154 record_db.cpp:570 INF[main ] Initialized buffer for event_id:336 name:UE_PHY_MEAS has_frame_slot:true columns:12 17:35:40.961126 record_db.cpp:570 INF[main ] Initialized buffer for event_id:337 name:UE_PHY_UL_PAYLOAD_TX_BITS has_frame_slot:true columns:30 17:35:40.962126 record_db.cpp:570 INF[main ] Initialized buffer for event_id:338 name:UE_PHY_UL_SCRAMBLED_TX_BITS has_frame_slot:true columns:30 17:35:40.962455 record_db.cpp:1063 INF[main ] Tables created, waiting for messages... 17:36:00.842116 record_db.cpp:1096 INF[main ] UE_PHY_UL_SCRAMBLED_TX_BITS rows: 52 total: 119 17:36:00.842117 record_db.cpp:1096 INF[main ] UE_PHY_UL_PAYLOAD_TX_BITS rows: 55 total: 119 17:36:00.842117 record_db.cpp:1096 INF[main ] UE_PHY_MEAS rows: 5 total: 12 17:36:00.842117 record_db.cpp:1096 INF[main ] UE_PHY_PDSCH_ENERGY rows: 6 total: 29 17:36:00.842117 record_db.cpp:1096 INF[main ] NRUE_MAC_DL_PDU_WITH_DATA rows: 6 total: 28 17:36:00.842117 record_db.cpp:1096 INF[main ] NRUE_MAC_UL_PDU_WITH_DATA rows: 54 total: 118 17:36:00.842118 record_db.cpp:1096 INF[main ] NRUE_PHY_MIB rows: 260 total: 495 17:36:00.842118 record_db.cpp:1100 INF[main ] 17:36:05.861012 record_db.cpp:1096 INF[main ] UE_PHY_UL_SCRAMBLED_TX_BITS rows: 55 total: 174 17:36:05.861013 record_db.cpp:1096 INF[main ] UE_PHY_UL_PAYLOAD_TX_BITS rows: 55 total: 174 17:36:05.861013 record_db.cpp:1096 INF[main ] UE_PHY_MEAS rows: 5 total: 17 17:36:05.861013 record_db.cpp:1096 INF[main ] UE_PHY_PDSCH_ENERGY rows: 12 total: 41 17:36:05.861013 record_db.cpp:1096 INF[main ] NRUE_MAC_DL_PDU_WITH_DATA rows: 12 total: 40 17:36:05.861014 record_db.cpp:1096 INF[main ] NRUE_MAC_UL_PDU_WITH_DATA rows: 56 total: 174 17:36:05.861014 record_db.cpp:1096 INF[main ] NRUE_PHY_MIB rows: 260 total: 755 This can also be done for the L2 on the gNB side: $ docker exec -it oai-gnb-aerial bash -c "record_db -on GNB_MAC_DL_PDU_WITH_DATA" turning ON GNB_MAC_DL_PDU_WITH_DATA connecting to 127.0.0.1:2021 16:31:01.742287 record_db.cpp:1000 INF[main ] on: item: GNB_MAC_DL_PDU_WITH_DATA, on_off_name: GNB_MAC_DL_PDU_WITH_DATA, on_off_action: 1 16:31:01.742340 record_db.cpp:1011 INF[main ] No database file provided, using default: T_messages.txt 16:31:01.751101 record_db.cpp:1020 INF[main ] Number of events: 801 16:31:01.752264 record_db.cpp:439 INF[main ] ClickHouse connection initialized 16:31:01.752997 record_db.cpp:570 INF[main ] Initialized buffer for event_id:49 name:GNB_MAC_DL_PDU_WITH_DATA has_frame_slot:true columns:9 16:31:01.753065 record_db.cpp:1063 INF[main ] Tables created, waiting for messages... 16:31:07.299147 record_db.cpp:1096 INF[main ] GNB_MAC_DL_PDU_WITH_DATA rows: 1 total: 1 16:31:07.299148 record_db.cpp:1100 INF[main ] 16:31:12.299490 record_db.cpp:1096 INF[main ] GNB_MAC_DL_PDU_WITH_DATA rows: 234 total: 235 16:31:12.299491 record_db.cpp:1100 INF[main ] 16:31:17.299594 record_db.cpp:1096 INF[main ] GNB_MAC_DL_PDU_WITH_DATA rows: 260 total: 495
94 lines
3.3 KiB
Docker
94 lines
3.3 KiB
Docker
#/*
|
|
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
|
# * contributor license agreements. See the NOTICE file distributed with
|
|
# * this work for additional information regarding copyright ownership.
|
|
# * The OpenAirInterface Software Alliance licenses this file to You under
|
|
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
|
# * except in compliance with the License.
|
|
# * You may obtain a copy of the License at
|
|
# *
|
|
# * http://www.openairinterface.org/?page_id=698
|
|
# *
|
|
# * Unless required by applicable law or agreed to in writing, software
|
|
# * distributed under the License is distributed on an "AS IS" BASIS,
|
|
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# * See the License for the specific language governing permissions and
|
|
# * limitations under the License.
|
|
# *-------------------------------------------------------------------------------
|
|
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
|
# * contact@openairinterface.org
|
|
# */
|
|
#---------------------------------------------------------------------
|
|
#
|
|
# Dockerfile for the Open-Air-Interface BUILD service
|
|
# Valid for Ubuntu 24.04
|
|
#
|
|
#---------------------------------------------------------------------
|
|
|
|
|
|
ARG UBUNTU_IMAGE=ubuntu:noble
|
|
FROM ${UBUNTU_IMAGE} AS ran-base
|
|
|
|
ARG NEEDED_GIT_PROXY
|
|
ARG TARGETARCH
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV TZ=Europe/Paris
|
|
ENV BUILD_UHD_FROM_SOURCE=True
|
|
ENV UHD_VERSION=4.8.0.0
|
|
|
|
#install developers pkg/repo
|
|
RUN apt-get update && \
|
|
apt-get upgrade --yes && \
|
|
apt-get install --yes \
|
|
#gcc needed for build_oai
|
|
build-essential \
|
|
ccache \
|
|
psmisc \
|
|
git \
|
|
xxd \
|
|
libpcre2-dev \
|
|
python3-dev \
|
|
bison \
|
|
flex \
|
|
m4 \
|
|
# libzstd-dev for ClickHouse C++ library
|
|
libzstd-dev \
|
|
# python3-pip for conf template generation
|
|
python3-pip \
|
|
wget \
|
|
flatbuffers-compiler \
|
|
libflatbuffers-dev \
|
|
libnanomsg-dev && \
|
|
# --break-system-packages allows externally managed environment in pip
|
|
pip3 install --ignore-installed pyyaml --break-system-packages
|
|
|
|
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
|
|
# it will be copied into target containers, to print exit numbers and handle signals properly
|
|
ENV TINI_VERSION=v0.19.0
|
|
RUN wget https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} -O /tini && chmod +x /tini
|
|
|
|
ENV YQ_VERSION=v4.2.0
|
|
RUN wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${TARGETARCH} -O /usr/local/bin/yq &&\
|
|
chmod +x /usr/local/bin/yq
|
|
|
|
# In some network environments, GIT proxy is required
|
|
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
|
|
|
|
# Copying only the needed files to create ran-base
|
|
WORKDIR /oai-ran/cmake_targets/tools
|
|
COPY cmake_targets/tools/build_helper \
|
|
cmake_targets/tools/uhd-4.x-tdd-patch.diff \
|
|
./
|
|
|
|
WORKDIR /oai-ran/cmake_targets
|
|
COPY cmake_targets/build_oai .
|
|
|
|
WORKDIR /oai-ran
|
|
COPY oaienv .
|
|
|
|
#run build_oai -I to get the builder image
|
|
RUN /bin/sh oaienv && \
|
|
cd cmake_targets && \
|
|
mkdir -p log && \
|
|
./build_oai -I -w USRP -w BLADERF --install-optional-packages
|