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
Michael Black
OpenXG UE
Commits
596c6f36
Commit
596c6f36
authored
Oct 03, 2021
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
poc : stats monitoring
parent
bb6d7b21
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
24 deletions
+37
-24
ci-scripts/main.py
ci-scripts/main.py
+1
-0
ci-scripts/ran.py
ci-scripts/ran.py
+21
-1
ci-scripts/stats_monitor.py
ci-scripts/stats_monitor.py
+14
-13
ci-scripts/xml_files/fr1_lte_2x2_quectel.xml
ci-scripts/xml_files/fr1_lte_2x2_quectel.xml
+1
-10
No files found.
ci-scripts/main.py
View file @
596c6f36
...
@@ -154,6 +154,7 @@ def GetParametersFromXML(action):
...
@@ -154,6 +154,7 @@ def GetParametersFromXML(action):
elif
action
==
'Initialize_eNB'
:
elif
action
==
'Initialize_eNB'
:
RAN
.
eNB_Trace
=
test
.
findtext
(
'eNB_Trace'
)
RAN
.
eNB_Trace
=
test
.
findtext
(
'eNB_Trace'
)
RAN
.
eNB_Stats
=
test
.
findtext
(
'eNB_Stats'
)
RAN
.
Initialize_eNB_args
=
test
.
findtext
(
'Initialize_eNB_args'
)
RAN
.
Initialize_eNB_args
=
test
.
findtext
(
'Initialize_eNB_args'
)
eNB_instance
=
test
.
findtext
(
'eNB_instance'
)
eNB_instance
=
test
.
findtext
(
'eNB_instance'
)
USRPIPAddress
=
test
.
findtext
(
'USRP_IPAddress'
)
USRPIPAddress
=
test
.
findtext
(
'USRP_IPAddress'
)
...
...
ci-scripts/ran.py
View file @
596c6f36
...
@@ -94,6 +94,7 @@ class RANManagement():
...
@@ -94,6 +94,7 @@ class RANManagement():
self
.
runtime_stats
=
''
self
.
runtime_stats
=
''
self
.
datalog_rt_stats
=
{}
self
.
datalog_rt_stats
=
{}
self
.
eNB_Trace
=
''
#if 'yes', Tshark will be launched at initialization
self
.
eNB_Trace
=
''
#if 'yes', Tshark will be launched at initialization
self
.
eNB_Stats
=
''
#if 'yes', Statistics Monitor will be launched at initialization
self
.
USRPIPAddress
=
''
self
.
USRPIPAddress
=
''
...
@@ -539,6 +540,23 @@ class RANManagement():
...
@@ -539,6 +540,23 @@ class RANManagement():
self
.
eNBstatuses
[
int
(
self
.
eNB_instance
)]
=
int
(
self
.
eNB_serverId
[
self
.
eNB_instance
])
self
.
eNBstatuses
[
int
(
self
.
eNB_instance
)]
=
int
(
self
.
eNB_serverId
[
self
.
eNB_instance
])
mySSH
.
close
()
mySSH
.
close
()
#if enabled in the xml,
#copyout the monitor script and launch it
if
self
.
eNB_Stats
==
'yes'
:
mySSH
.
open
(
lIpAddr
,
lUserName
,
lPassWord
)
monitor_file
=
'stats_monitor.py'
mySSH
.
command
(
'echo '
+
lPassWord
+
' | sudo -S cp '
+
self
.
eNBSourceCodePath
+
'/ci-scripts/'
+
monitor_file
+
' '
+
self
.
eNBSourceCodePath
+
'/cmake_targets/ran_build/build/.'
,
'\$'
,
5
)
#launch, it will stop when the softmodem stops
mySSH
.
command
(
'echo $USER; nohup python3 '
+
self
.
eNBSourceCodePath
+
'/cmake_targets/ran_build/build/'
+
monitor_file
+
' 2>&1 &'
,
'\$'
,
5
)
mySSH
.
close
()
HTML
.
CreateHtmlTestRow
(
self
.
air_interface
[
self
.
eNB_instance
]
+
' -O '
+
config_file
+
extra_options
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
HTML
.
CreateHtmlTestRow
(
self
.
air_interface
[
self
.
eNB_instance
]
+
' -O '
+
config_file
+
extra_options
,
'OK'
,
CONST
.
ALL_PROCESSES_OK
)
logging
.
debug
(
'
\u001B
[1m Initialize eNB/gNB/ocp-eNB Completed
\u001B
[0m'
)
logging
.
debug
(
'
\u001B
[1m Initialize eNB/gNB/ocp-eNB Completed
\u001B
[0m'
)
...
@@ -690,8 +708,10 @@ class RANManagement():
...
@@ -690,8 +708,10 @@ class RANManagement():
mySSH
.
command
(
'cd cmake_targets'
,
'\$'
,
5
)
mySSH
.
command
(
'cd cmake_targets'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S mv /tmp/enb_*.pcap .'
,
'\$'
,
20
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S mv /tmp/enb_*.pcap .'
,
'\$'
,
20
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S mv /tmp/gnb_*.pcap .'
,
'\$'
,
20
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S mv /tmp/gnb_*.pcap .'
,
'\$'
,
20
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S mv /tmp/*monitor.pickle .'
,
'\$'
,
20
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S mv /tmp/*monitor.png .'
,
'\$'
,
20
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S rm -f enb.log.zip'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S rm -f enb.log.zip'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log'
,
'\$'
,
60
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log
*monitor.pickle *monitor.png
'
,
'\$'
,
60
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
eNBPassword
+
' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap gnb_*.pcap enb_*txt physim_*.log *stats.log'
,
'\$'
,
5
)
mySSH
.
close
()
mySSH
.
close
()
...
...
ci-scripts/
radio
_monitor.py
→
ci-scripts/
stats
_monitor.py
View file @
596c6f36
...
@@ -6,19 +6,20 @@ import sys
...
@@ -6,19 +6,20 @@ import sys
import
matplotlib.pyplot
as
plt
import
matplotlib.pyplot
as
plt
import
pickle
import
pickle
import
numpy
as
np
import
numpy
as
np
import
os
def
collect
(
d
):
def
collect
(
d
):
cmd
=
'cat L1_stats.log MAC_stats.log PDCP_stats.log RRC_stats.log'
cmd
=
'cat L1_stats.log MAC_stats.log PDCP_stats.log RRC_stats.log'
process
=
subprocess
.
Popen
(
shlex
.
split
(
cmd
),
stdout
=
subprocess
.
PIPE
)
process
=
subprocess
.
Popen
(
shlex
.
split
(
cmd
),
stdout
=
subprocess
.
PIPE
)
output
=
process
.
stdout
.
readlines
()
output
=
process
.
stdout
.
readlines
()
for
l
in
output
:
for
l
in
output
:
tmp
=
l
.
decode
(
"utf-8"
)
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
)
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
:
if
result
is
not
None
:
d
[
'PHR'
].
append
(
int
(
result
.
group
(
1
)))
d
[
'PHR'
].
append
(
int
(
result
.
group
(
1
)))
d
[
'bler'
].
append
(
float
(
result
.
group
(
2
)))
d
[
'bler'
].
append
(
float
(
result
.
group
(
2
)))
d
[
'mcsoff'
].
append
(
int
(
result
.
group
(
3
)))
d
[
'mcsoff'
].
append
(
int
(
result
.
group
(
3
)))
d
[
'mcs'
].
append
(
int
(
result
.
group
(
4
)))
d
[
'mcs'
].
append
(
int
(
result
.
group
(
4
)))
def
graph
(
d
):
def
graph
(
d
):
...
@@ -60,7 +61,7 @@ def graph(d):
...
@@ -60,7 +61,7 @@ def graph(d):
plt
.
tight_layout
()
plt
.
tight_layout
()
# Combine all the operations and display
# Combine all the operations and display
plt
.
savefig
(
'/tmp/
radio_monitor_dump
.png'
)
plt
.
savefig
(
'/tmp/
stats_monitor
.png'
)
plt
.
show
()
plt
.
show
()
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
@@ -82,7 +83,7 @@ if __name__ == "__main__":
...
@@ -82,7 +83,7 @@ if __name__ == "__main__":
output
=
process
.
stdout
.
readlines
()
output
=
process
.
stdout
.
readlines
()
time
.
sleep
(
1
)
time
.
sleep
(
1
)
print
(
'process stopped'
)
print
(
'process stopped'
)
with
open
(
'/tmp/
radio_monitor_dump
.pickle'
,
'wb'
)
as
handle
:
with
open
(
'/tmp/
stats_monitor
.pickle'
,
'wb'
)
as
handle
:
pickle
.
dump
(
d
,
handle
,
protocol
=
pickle
.
HIGHEST_PROTOCOL
)
pickle
.
dump
(
d
,
handle
,
protocol
=
pickle
.
HIGHEST_PROTOCOL
)
graph
(
d
)
graph
(
d
)
...
...
ci-scripts/xml_files/fr1_lte_2x2_quectel.xml
View file @
596c6f36
...
@@ -64,20 +64,11 @@
...
@@ -64,20 +64,11 @@
<eNB_serverId>
0
</eNB_serverId>
<eNB_serverId>
0
</eNB_serverId>
<air_interface>
lte
</air_interface>
<air_interface>
lte
</air_interface>
<eNB_Trace>
yes
</eNB_Trace>
<eNB_Trace>
yes
</eNB_Trace>
<eNB_Stats>
yes
</eNB_Stats>
<USRP_IPAddress>
192.168.18.241
</USRP_IPAddress>
<USRP_IPAddress>
192.168.18.241
</USRP_IPAddress>
</testCase>
</testCase>
<testCase
id=
"040000"
>
<class>
Initialize_eNB
</class>
<desc>
Initialize gNB
</desc>
<Initialize_eNB_args>
-O ci-scripts/conf_files/gnb.band78.nsa_2x2.106PRB.usrpn310.conf -q
</Initialize_eNB_args>
<eNB_instance>
1
</eNB_instance>
<eNB_serverId>
1
</eNB_serverId>
<air_interface>
nr
</air_interface>
<USRP_IPAddress>
192.168.18.240
</USRP_IPAddress>
</testCase>
<testCase
id=
"000001"
>
<testCase
id=
"000001"
>
<class>
IdleSleep
</class>
<class>
IdleSleep
</class>
<desc>
Sleep
</desc>
<desc>
Sleep
</desc>
...
...
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