Commit af5e0f69 authored by Xiaowu Zhang's avatar Xiaowu Zhang

software/ors-amarisoft: Add xamari xlog service

Add a service that runs `xamari xlog stats[samples,rf]/<period>s` in
enb/gnb instance. For now the resulting logfile enb.xlog/gnb.xlog is
placed in monitor public folder to be served by monitor http server.

Optionally the service also includes `x.drb_stats/<period>s`, which
implies 100Hz polling. This is enabled by default.
parent 2148fffb
...@@ -122,6 +122,12 @@ ...@@ -122,6 +122,12 @@
"type": "number", "type": "number",
"default": 60 "default": 60
}, },
"enb_drb_stats_enabled": {
"title": "Enable eNB drb statistics",
"description": "Enable eNB drb statistics through 100Hz polling, needed for E-UTRAN IP Throughput KPI",
"type": "boolean",
"default": true
},
"max_rx_sample_db": { "max_rx_sample_db": {
"title": "Maximum RX sample value (dB)", "title": "Maximum RX sample value (dB)",
"description": "Maximum RX sample threshold above which RX saturated promise will fail", "description": "Maximum RX sample threshold above which RX saturated promise will fail",
......
...@@ -4,6 +4,7 @@ parts = ...@@ -4,6 +4,7 @@ parts =
ltelogs ltelogs
enb-config enb-config
enb-service enb-service
xamari-xlog-service
amarisoft-stats-service amarisoft-stats-service
amarisoft-rf-info-service amarisoft-rf-info-service
{% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %} {% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %}
...@@ -133,6 +134,30 @@ environment = ...@@ -133,6 +134,30 @@ environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib LD_LIBRARY_PATH={{ openssl_location }}/lib
AMARISOFT_PATH=/opt/amarisoft/.amarisoft AMARISOFT_PATH=/opt/amarisoft/.amarisoft
[xamari-xlog-script]
recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
period = {{ slapparameter_dict.get("enb_stats_fetch_period", 60) }}
stats_logspec = stats[samples,rf]/${:period}s
{%- if slapparameter_dict.get("enb_drb_stats_enabled", True) %}
drb_stats_logspec = x.drb_stats/${:period}s
{%- else %}
drb_stats_logspec =
{%- endif %}
logspec = ${:stats_logspec} ${:drb_stats_logspec}
websock = ws://127.0.1.2:9001
xamari = {{ buildout_directory }}/bin/xamari
logfile = ${monitor-directory:public}/enb.xlog
inline =
#!/bin/sh
exec ${:xamari} xlog ${:websock} ${:logspec} > ${:logfile}
[xamari-xlog-service]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:service}/${:_buildout_section_name_}
command-line = ${xamari-xlog-script:output}
hash-files = ${:command-line}
[amarisoft-stats-template] [amarisoft-stats-template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do extensions = jinja2.ext.do
......
...@@ -254,6 +254,12 @@ ...@@ -254,6 +254,12 @@
"type": "number", "type": "number",
"default": 60 "default": 60
}, },
"gnb_drb_stats_enabled": {
"title": "Enable gNB drb statistics",
"description": "Enable gNB drb statistics through 100Hz polling, needed for E-UTRAN IP Throughput KPI",
"type": "boolean",
"default": true
},
"max_rx_sample_db": { "max_rx_sample_db": {
"title": "Maximum RX sample value (dB)", "title": "Maximum RX sample value (dB)",
"description": "Maximum RX sample threshold above which RX saturated promise will fail", "description": "Maximum RX sample threshold above which RX saturated promise will fail",
......
...@@ -4,6 +4,7 @@ parts = ...@@ -4,6 +4,7 @@ parts =
ltelogs ltelogs
gnb-config gnb-config
enb-service enb-service
xamari-xlog-service
amarisoft-stats-service amarisoft-stats-service
amarisoft-rf-info-service amarisoft-rf-info-service
{% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %} {% if slapparameter_dict.get('rrh', '') == "Lopcomm ORAN" %}
...@@ -134,6 +135,30 @@ environment = ...@@ -134,6 +135,30 @@ environment =
LD_LIBRARY_PATH={{ openssl_location }}/lib LD_LIBRARY_PATH={{ openssl_location }}/lib
AMARISOFT_PATH=/opt/amarisoft/.amarisoft AMARISOFT_PATH=/opt/amarisoft/.amarisoft
[xamari-xlog-script]
recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
period = {{ slapparameter_dict.get("gnb_stats_fetch_period", 60) }}
stats_logspec = stats[samples,rf]/${:period}s
{%- if slapparameter_dict.get("gnb_drb_stats_enabled", True) %}
drb_stats_logspec = x.drb_stats/${:period}s
{%- else %}
drb_stats_logspec =
{%- endif %}
logspec = ${:stats_logspec} ${:drb_stats_logspec}
websock = ws://127.0.1.2:9001
xamari = {{ buildout_directory }}/bin/xamari
logfile = ${monitor-directory:public}/gnb.xlog
inline =
#!/bin/sh
exec ${:xamari} xlog ${:websock} ${:logspec} > ${:logfile}
[xamari-xlog-service]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:service}/${:_buildout_section_name_}
command-line = ${xamari-xlog-script:output}
hash-files = ${:command-line}
[amarisoft-stats-template] [amarisoft-stats-template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do extensions = jinja2.ext.do
......
...@@ -122,6 +122,12 @@ ...@@ -122,6 +122,12 @@
"type": "number", "type": "number",
"default": 60 "default": 60
}, },
"enb_drb_stats_enabled": {
"title": "Enable eNB drb statistics",
"description": "Enable eNB drb statistics through 100Hz polling, needed for E-UTRAN IP Throughput KPI",
"type": "boolean",
"default": true
},
"max_rx_sample_db": { "max_rx_sample_db": {
"title": "Maximum RX sample value (dB)", "title": "Maximum RX sample value (dB)",
"description": "Maximum RX sample threshold above which RX saturated promise will fail", "description": "Maximum RX sample threshold above which RX saturated promise will fail",
......
...@@ -254,6 +254,12 @@ ...@@ -254,6 +254,12 @@
"type": "number", "type": "number",
"default": 60 "default": 60
}, },
"gnb_drb_stats_enabled": {
"title": "Enable gNB drb statistics",
"description": "Enable gNB drb statistics through 100Hz polling, needed for E-UTRAN IP Throughput KPI",
"type": "boolean",
"default": true
},
"max_rx_sample_db": { "max_rx_sample_db": {
"title": "Maximum RX sample value (dB)", "title": "Maximum RX sample value (dB)",
"description": "Maximum RX sample threshold above which RX saturated promise will fail", "description": "Maximum RX sample threshold above which RX saturated promise will fail",
......
...@@ -122,6 +122,12 @@ ...@@ -122,6 +122,12 @@
"type": "number", "type": "number",
"default": 60 "default": 60
}, },
"enb_drb_stats_enabled": {
"title": "Enable eNB drb statistics",
"description": "Enable eNB drb statistics through 100Hz polling, needed for E-UTRAN IP Throughput KPI",
"type": "boolean",
"default": true
},
"max_rx_sample_db": { "max_rx_sample_db": {
"title": "Maximum RX sample value (dB)", "title": "Maximum RX sample value (dB)",
"description": "Maximum RX sample threshold above which RX saturated promise will fail", "description": "Maximum RX sample threshold above which RX saturated promise will fail",
......
...@@ -254,6 +254,12 @@ ...@@ -254,6 +254,12 @@
"type": "number", "type": "number",
"default": 60 "default": 60
}, },
"gnb_drb_stats_enabled": {
"title": "Enable gNB drb statistics",
"description": "Enable gNB drb statistics through 100Hz polling, needed for E-UTRAN IP Throughput KPI",
"type": "boolean",
"default": true
},
"max_rx_sample_db": { "max_rx_sample_db": {
"title": "Maximum RX sample value (dB)", "title": "Maximum RX sample value (dB)",
"description": "Maximum RX sample threshold above which RX saturated promise will fail", "description": "Maximum RX sample threshold above which RX saturated promise will fail",
......
...@@ -122,6 +122,12 @@ ...@@ -122,6 +122,12 @@
"type": "number", "type": "number",
"default": 60 "default": 60
}, },
"enb_drb_stats_enabled": {
"title": "Enable eNB drb statistics",
"description": "Enable eNB drb statistics through 100Hz polling, needed for E-UTRAN IP Throughput KPI",
"type": "boolean",
"default": true
},
"max_rx_sample_db": { "max_rx_sample_db": {
"title": "Maximum RX sample value (dB)", "title": "Maximum RX sample value (dB)",
"description": "Maximum RX sample threshold above which RX saturated promise will fail", "description": "Maximum RX sample threshold above which RX saturated promise will fail",
......
...@@ -254,6 +254,12 @@ ...@@ -254,6 +254,12 @@
"type": "number", "type": "number",
"default": 60 "default": 60
}, },
"gnb_drb_stats_enabled": {
"title": "Enable gNB drb statistics",
"description": "Enable gNB drb statistics through 100Hz polling, needed for E-UTRAN IP Throughput KPI",
"type": "boolean",
"default": true
},
"max_rx_sample_db": { "max_rx_sample_db": {
"title": "Maximum RX sample value (dB)", "title": "Maximum RX sample value (dB)",
"description": "Maximum RX sample threshold above which RX saturated promise will fail", "description": "Maximum RX sample threshold above which RX saturated promise will fail",
......
...@@ -122,6 +122,12 @@ ...@@ -122,6 +122,12 @@
"type": "number", "type": "number",
"default": 60 "default": 60
}, },
"enb_drb_stats_enabled": {
"title": "Enable eNB drb statistics",
"description": "Enable eNB drb statistics through 100Hz polling, needed for E-UTRAN IP Throughput KPI",
"type": "boolean",
"default": true
},
"max_rx_sample_db": { "max_rx_sample_db": {
"title": "Maximum RX sample value (dB)", "title": "Maximum RX sample value (dB)",
"description": "Maximum RX sample threshold above which RX saturated promise will fail", "description": "Maximum RX sample threshold above which RX saturated promise will fail",
......
...@@ -254,6 +254,12 @@ ...@@ -254,6 +254,12 @@
"type": "number", "type": "number",
"default": 60 "default": 60
}, },
"gnb_drb_stats_enabled": {
"title": "Enable gNB drb statistics",
"description": "Enable gNB drb statistics through 100Hz polling, needed for E-UTRAN IP Throughput KPI",
"type": "boolean",
"default": true
},
"max_rx_sample_db": { "max_rx_sample_db": {
"title": "Maximum RX sample value (dB)", "title": "Maximum RX sample value (dB)",
"description": "Maximum RX sample threshold above which RX saturated promise will fail", "description": "Maximum RX sample threshold above which RX saturated promise will fail",
......
...@@ -9,6 +9,10 @@ extends = ...@@ -9,6 +9,10 @@ extends =
../../component/python3/buildout.cfg ../../component/python3/buildout.cfg
../../component/python-pynacl/buildout.cfg ../../component/python-pynacl/buildout.cfg
../../component/bcrypt/buildout.cfg ../../component/bcrypt/buildout.cfg
../../component/numpy/buildout.cfg
../../component/pygolang/buildout.cfg
../../component/git/buildout.cfg
parts += parts +=
template template
...@@ -34,6 +38,7 @@ parts += ...@@ -34,6 +38,7 @@ parts +=
rsvp.js rsvp.js
iperf3 iperf3
eggs eggs
xamari
# unimplemented parts - the http monitor and better log handling using logrotate # unimplemented parts - the http monitor and better log handling using logrotate
# apache-php # apache-php
...@@ -175,6 +180,25 @@ eggs = ...@@ -175,6 +180,25 @@ eggs =
ncclient ncclient
interpreter = pythonwitheggs interpreter = pythonwitheggs
[xlte-repository]
recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/kirr/xlte.git
revision = 58220253
git-executable = ${git:location}/bin/git
[xlte]
recipe = zc.recipe.egg:develop
setup = ${xlte-repository:location}
egg = xlte
depends =
${numpy:egg}
${pygolang:egg}
[xamari]
recipe = zc.recipe.egg
eggs = ${xlte:egg}
scripts = xamari
[versions] [versions]
websocket-client = 1.4.2 websocket-client = 1.4.2
ncclient = 0.6.13 ncclient = 0.6.13
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment