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
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
zzha zzha
OpenXG-RAN
Commits
6c64382d
Commit
6c64382d
authored
Oct 11, 2021
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
collect stats log for multiple nodes
parent
92c5b69b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
12 deletions
+29
-12
ci-scripts/ran.py
ci-scripts/ran.py
+16
-5
ci-scripts/stats_monitor.py
ci-scripts/stats_monitor.py
+11
-7
ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml
ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml
+2
-0
No files found.
ci-scripts/ran.py
View file @
6c64382d
...
...
@@ -482,13 +482,14 @@ class RANManagement():
mySSH
.
command
(
'echo $USER; nohup sudo -E ./my-lte-softmodem-run'
+
str
(
self
.
eNB_instance
)
+
'.sh > '
+
lSourcePath
+
'/cmake_targets/enb_'
+
self
.
testCase_id
+
'.log 2>&1 &'
,
lUserName
,
10
)
#
tentativ
e
#
stats monitoring during runtim
e
time
.
sleep
(
20
)
monitor_file
=
'stats_monitor.py'
if
self
.
eNB_Stats
==
'yes'
:
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)
#mySSH.command('echo $USER; nohup python3 ' + self.eNBSourceCodePath + '/cmake_targets/ran_build/build/' + monitor_file + ' 2>&1 &', '\$', 5)
mySSH
.
command
(
'echo $USER; nohup python3 ../ci-scripts/'
+
monitor_file
+
' 2>&1 >
stats_monitor_execution.log &'
,
'\$'
,
5
)
if
(
self
.
air_interface
[
self
.
eNB_instance
]
==
'lte-softmodem'
)
or
(
self
.
air_interface
[
self
.
eNB_instance
]
==
'ocp-enb'
):
mySSH
.
command
(
'echo $USER; nohup python3 ../ci-scripts/'
+
monitor_file
+
'
\'
enb
\'
2>&1 > enb_stats_monitor_execution.log &'
,
'\$'
,
5
)
else
:
mySSH
.
command
(
'echo $USER; nohup python3 ../ci-scripts/'
+
monitor_file
+
'
\'
gnb
\'
2>&1 > gnb_
stats_monitor_execution.log &'
,
'\$'
,
5
)
...
...
@@ -686,6 +687,11 @@ class RANManagement():
fileToAnalyze
=
self
.
eNBLogFiles
[
int
(
self
.
eNB_instance
)]
self
.
eNBLogFiles
[
int
(
self
.
eNB_instance
)]
=
''
if
analyzeFile
:
#*stats.log files + pickle + png
mySSH
.
copyin
(
lIpAddr
,
lUserName
,
lPassWord
,
lSourcePath
+
'/cmake_targets/*stats.log'
,
'.'
)
mySSH
.
copyin
(
lIpAddr
,
lUserName
,
lPassWord
,
lSourcePath
+
'/cmake_targets/*.pickle'
,
'.'
)
mySSH
.
copyin
(
lIpAddr
,
lUserName
,
lPassWord
,
lSourcePath
+
'/cmake_targets/*.png'
,
'.'
)
#
copyin_res
=
mySSH
.
copyin
(
lIpAddr
,
lUserName
,
lPassWord
,
lSourcePath
+
'/cmake_targets/'
+
fileToAnalyze
,
'.'
)
if
(
copyin_res
==
-
1
):
logging
.
debug
(
'
\u001B
[1;37;41m Could not copy '
+
nodeB_prefix
+
'NB logfile to analyze it!
\u001B
[0m'
)
...
...
@@ -694,6 +700,11 @@ class RANManagement():
self
.
eNBmbmsEnables
[
int
(
self
.
eNB_instance
)]
=
False
return
if
self
.
eNB_serverId
[
self
.
eNB_instance
]
!=
'0'
:
#*stats.log files + pickle + png
mySSH
.
copyout
(
self
.
eNBIPAddress
,
self
.
eNBUserName
,
self
.
eNBPassword
,
'./*stats.log'
,
self
.
eNBSourceCodePath
+
'/cmake_targets/'
)
mySSH
.
copyout
(
self
.
eNBIPAddress
,
self
.
eNBUserName
,
self
.
eNBPassword
,
'./*.pickle'
,
self
.
eNBSourceCodePath
+
'/cmake_targets/'
)
mySSH
.
copyout
(
self
.
eNBIPAddress
,
self
.
eNBUserName
,
self
.
eNBPassword
,
'./*.png'
,
self
.
eNBSourceCodePath
+
'/cmake_targets/'
)
#
mySSH
.
copyout
(
self
.
eNBIPAddress
,
self
.
eNBUserName
,
self
.
eNBPassword
,
'./'
+
fileToAnalyze
,
self
.
eNBSourceCodePath
+
'/cmake_targets/'
)
logging
.
debug
(
'
\u001B
[1m Analyzing '
+
nodeB_prefix
+
'NB logfile
\u001B
[0m '
+
fileToAnalyze
)
logStatus
=
self
.
AnalyzeLogFile_eNB
(
fileToAnalyze
,
HTML
)
...
...
ci-scripts/stats_monitor.py
View file @
6c64382d
...
...
@@ -8,8 +8,11 @@ import pickle
import
numpy
as
np
import
os
def
collect
(
d
):
cmd
=
'cat L1_stats.log MAC_stats.log PDCP_stats.log RRC_stats.log nrL1_stats.log nrMAC_stats.log nrPDCP_stats.log nrRRC_stats.log'
def
collect
(
d
,
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
()
for
l
in
output
:
...
...
@@ -22,7 +25,7 @@ def collect(d):
d
[
'mcs'
].
append
(
int
(
result
.
group
(
4
)))
def
graph
(
d
):
def
graph
(
d
,
node_type
):
figure
,
axis
=
plt
.
subplots
(
4
,
1
,
figsize
=
(
10
,
10
))
...
...
@@ -61,11 +64,12 @@ def graph(d):
plt
.
tight_layout
()
# Combine all the operations and display
plt
.
savefig
(
'/tmp/stats_monitor.png'
)
plt
.
savefig
(
'/tmp/
'
+
node_type
+
'_
stats_monitor.png'
)
plt
.
show
()
if
__name__
==
"__main__"
:
node_type
=
sys
.
argv
[
1
]
#enb or gnb
d
=
{}
d
[
'PHR'
]
=
[]
...
...
@@ -78,13 +82,13 @@ if __name__ == "__main__":
process
=
subprocess
.
Popen
(
cmd
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
)
output
=
process
.
stdout
.
readlines
()
while
len
(
output
)
!=
0
:
collect
(
d
)
collect
(
d
,
node_type
)
process
=
subprocess
.
Popen
(
cmd
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
)
output
=
process
.
stdout
.
readlines
()
time
.
sleep
(
1
)
print
(
'process stopped'
)
with
open
(
'/tmp/stats_monitor.pickle'
,
'wb'
)
as
handle
:
with
open
(
'/tmp/
'
+
node_type
+
'_
stats_monitor.pickle'
,
'wb'
)
as
handle
:
pickle
.
dump
(
d
,
handle
,
protocol
=
pickle
.
HIGHEST_PROTOCOL
)
graph
(
d
)
graph
(
d
,
node_type
)
ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml
View file @
6c64382d
...
...
@@ -65,6 +65,7 @@
<eNB_serverId>
0
</eNB_serverId>
<air_interface>
lte
</air_interface>
<eNB_Trace>
yes
</eNB_Trace>
<eNB_Stats>
yes
</eNB_Stats>
<USRP_IPAddress>
192.168.18.241
</USRP_IPAddress>
</testCase>
...
...
@@ -76,6 +77,7 @@
<eNB_instance>
1
</eNB_instance>
<eNB_serverId>
1
</eNB_serverId>
<air_interface>
nr
</air_interface>
<eNB_Stats>
yes
</eNB_Stats>
<USRP_IPAddress>
192.168.18.240
</USRP_IPAddress>
</testCase>
...
...
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