Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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-RAN
Commits
37c66efd
Commit
37c66efd
authored
Oct 13, 2021
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve script struct
parent
13dcddf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
7 deletions
+28
-7
ci-scripts/stats_monitor_dev.py
ci-scripts/stats_monitor_dev.py
+28
-7
No files found.
ci-scripts/stats_monitor_dev.py
View file @
37c66efd
...
...
@@ -19,13 +19,7 @@ class Stat_Monitor():
self
.
d
[
node
][
metric
]
=
[]
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
()
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
)
...
...
@@ -36,6 +30,33 @@ class Stat_Monitor():
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
...
...
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