Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG UE
Commits
aedff0b6
Commit
aedff0b6
authored
Oct 13, 2021
by
hardy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/ci_test_sa_nsa' into integration_2021_wk41
parents
ad49a227
c7f99704
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
113 additions
and
1 deletion
+113
-1
ci-scripts/stats_monitor.py
ci-scripts/stats_monitor.py
+1
-1
ci-scripts/stats_monitor_conf.yaml
ci-scripts/stats_monitor_conf.yaml
+11
-0
ci-scripts/stats_monitor_dev.py
ci-scripts/stats_monitor_dev.py
+100
-0
ci-scripts/yaml_files/fr1_epc_20897/docker-compose.yml
ci-scripts/yaml_files/fr1_epc_20897/docker-compose.yml
+1
-0
No files found.
ci-scripts/stats_monitor.py
View file @
aedff0b6
...
...
@@ -78,7 +78,7 @@ if __name__ == "__main__":
d
[
'mcs'
]
=
[]
cmd
=
'ps aux | grep mode | grep -v grep'
cmd
=
'ps aux | grep mode
m
| grep -v grep'
process
=
subprocess
.
Popen
(
cmd
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
)
output
=
process
.
stdout
.
readlines
()
while
len
(
output
)
!=
0
:
...
...
ci-scripts/stats_monitor_conf.yaml
0 → 100644
View file @
aedff0b6
enb
:
PHR
:
bler
:
mcsoff
:
mcs
:
gnb
:
PHR
:
bler
:
mcsoff
:
mcs
:
\ No newline at end of file
ci-scripts/stats_monitor_dev.py
0 → 100755
View file @
aedff0b6
import
subprocess
import
time
import
shlex
import
re
import
sys
import
matplotlib.pyplot
as
plt
import
pickle
import
numpy
as
np
import
os
import
yaml
class
Stat_Monitor
():
def
__init__
(
self
,):
with
open
(
'stats_monitor_conf.yaml'
,
'r'
)
as
f
:
self
.
d
=
yaml
.
load
(
f
)
for
node
in
self
.
d
:
for
metric
in
self
.
d
[
node
]:
self
.
d
[
node
][
metric
]
=
[]
def
process_enb
(
self
,
node_type
,
output
):
for
l
in
output
:
tmp
=
l
.
decode
(
"utf-8"
)
result
=
re
.
match
(
rf'^.*\bPHR\b ([0-9]+).+\bbler\b ([0-9]+\.[0-9]+).+\bmcsoff\b ([0-9]+).+\bmcs\b ([0-9]+)'
,
tmp
)
if
result
is
not
None
:
self
.
d
[
node_type
][
'PHR'
].
append
(
int
(
result
.
group
(
1
)))
self
.
d
[
node_type
][
'bler'
].
append
(
float
(
result
.
group
(
2
)))
self
.
d
[
node_type
][
'mcsoff'
].
append
(
int
(
result
.
group
(
3
)))
self
.
d
[
node_type
][
'mcs'
].
append
(
int
(
result
.
group
(
4
)))
def
process_gnb
(
self
,
node_type
,
output
):
for
l
in
output
:
tmp
=
l
.
decode
(
"utf-8"
)
result
=
re
.
match
(
rf'^.*\bPHR\b ([0-9]+).+\bbler\b ([0-9]+\.[0-9]+).+\bmcsoff\b ([0-9]+).+\bmcs\b ([0-9]+)'
,
tmp
)
if
result
is
not
None
:
self
.
d
[
node_type
][
'PHR'
].
append
(
int
(
result
.
group
(
1
)))
self
.
d
[
node_type
][
'bler'
].
append
(
float
(
result
.
group
(
2
)))
self
.
d
[
node_type
][
'mcsoff'
].
append
(
int
(
result
.
group
(
3
)))
self
.
d
[
node_type
][
'mcs'
].
append
(
int
(
result
.
group
(
4
)))
def
collect
(
self
,
node_type
):
if
node_type
==
'enb'
:
cmd
=
'cat L1_stats.log MAC_stats.log PDCP_stats.log RRC_stats.log'
else
:
#'gnb'
cmd
=
'cat nrL1_stats.log nrMAC_stats.log nrPDCP_stats.log nrRRC_stats.log'
process
=
subprocess
.
Popen
(
shlex
.
split
(
cmd
),
stdout
=
subprocess
.
PIPE
)
output
=
process
.
stdout
.
readlines
()
if
node_type
==
'enb'
:
self
.
process_enb
(
node_type
,
output
)
else
:
#'gnb'
self
.
process_gnb
(
node_type
,
output
)
def
graph
(
self
,
node_type
):
col
=
1
figure
,
axis
=
plt
.
subplots
(
len
(
self
.
d
[
node_type
]),
col
,
figsize
=
(
10
,
10
))
i
=
0
for
metric
in
self
.
d
[
node_type
]:
major_ticks
=
np
.
arange
(
0
,
len
(
self
.
d
[
node_type
][
metric
])
+
1
,
1
)
axis
[
i
].
set_xticks
(
major_ticks
)
axis
[
i
].
set_xticklabels
([])
axis
[
i
].
plot
(
self
.
d
[
node_type
][
metric
],
marker
=
'o'
)
axis
[
i
].
set_xlabel
(
'time'
)
axis
[
i
].
set_ylabel
(
metric
)
axis
[
i
].
set_title
(
metric
)
i
+=
1
plt
.
tight_layout
()
# Combine all the operations and display
plt
.
savefig
(
node_type
+
'_stats_monitor.png'
)
plt
.
show
()
if
__name__
==
"__main__"
:
node_type
=
sys
.
argv
[
1
]
#enb or gnb
mon
=
Stat_Monitor
()
#collecting stats when modem process is stopped
cmd
=
'ps aux | grep mode | grep -v grep'
process
=
subprocess
.
Popen
(
cmd
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
)
output
=
process
.
stdout
.
readlines
()
while
len
(
output
)
!=
0
:
mon
.
collect
(
node_type
)
process
=
subprocess
.
Popen
(
cmd
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
)
output
=
process
.
stdout
.
readlines
()
time
.
sleep
(
1
)
print
(
'Process stopped'
)
with
open
(
node_type
+
'_stats_monitor.pickle'
,
'wb'
)
as
handle
:
pickle
.
dump
(
mon
.
d
,
handle
,
protocol
=
pickle
.
HIGHEST_PROTOCOL
)
mon
.
graph
(
node_type
)
ci-scripts/yaml_files/fr1_epc_20897/docker-compose.yml
View file @
aedff0b6
...
...
@@ -143,6 +143,7 @@ services:
TAC
:
1
GW_ID
:
1
REALM
:
openairinterface.org
UE_MTU_IPV4
:
1500
healthcheck
:
test
:
/bin/bash -c "pgrep oai_spgwc"
interval
:
10s
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment