From 4b03a4ad619c01a2774fcaed9ff816b6dd8e0e54 Mon Sep 17 00:00:00 2001 From: hardy Date: Tue, 12 Oct 2021 13:26:25 +0200 Subject: [PATCH 1/7] copyout workaround --- ci-scripts/ran.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 907a6cd667..fa97d8f3e1 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -38,7 +38,10 @@ import os import time from multiprocessing import Process, Lock, SimpleQueue import yaml +<<<<<<< HEAD +======= +>>>>>>> 90c6b8b58b... copyout workaround #----------------------------------------------------------- # OAI Testing modules @@ -701,9 +704,12 @@ class RANManagement(): 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/') + + #debug / tentative + mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './nrL1_stats.log', self.eNBSourceCodePath + '/cmake_targets/') + mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './nrMAC_stats.log', self.eNBSourceCodePath + '/cmake_targets/') + mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './gnb_stats_monitor.pickle.pickle', self.eNBSourceCodePath + '/cmake_targets/') + mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './gnb_stats_monitor.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) From 65d64518db3653bb043218b54934614680ad68bc Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 13 Oct 2021 16:12:06 +0200 Subject: [PATCH 2/7] typo fix --- ci-scripts/ran.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index fa97d8f3e1..35ef4005de 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -38,10 +38,6 @@ import os import time from multiprocessing import Process, Lock, SimpleQueue import yaml -<<<<<<< HEAD - -======= ->>>>>>> 90c6b8b58b... copyout workaround #----------------------------------------------------------- # OAI Testing modules From e579d5d27a6763d46f0df8ce1fabd24535934dbf Mon Sep 17 00:00:00 2001 From: hardy Date: Wed, 13 Oct 2021 16:18:55 +0200 Subject: [PATCH 3/7] fix typo --- ci-scripts/ran.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 35ef4005de..43ae3bf5c0 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -712,7 +712,7 @@ class RANManagement(): logStatus = self.AnalyzeLogFile_eNB(fileToAnalyze, HTML) if (logStatus < 0): HTML.CreateHtmlTestRow('N/A', 'KO', logStatus) - self.preamtureExit = True + self.prematureExit = True self.eNBmbmsEnables[int(self.eNB_instance)] = False return else: From 95108806c5e786067955919f4d95e92e050044e2 Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 14 Oct 2021 08:34:09 +0200 Subject: [PATCH 4/7] checking pep8 --- ci-scripts/stats_monitor_dev.py | 54 ++++++++++++++++----------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/ci-scripts/stats_monitor_dev.py b/ci-scripts/stats_monitor_dev.py index cbf0d20880..44f79dfb73 100755 --- a/ci-scripts/stats_monitor_dev.py +++ b/ci-scripts/stats_monitor_dev.py @@ -1,28 +1,31 @@ +""" +To create graphs and pickle from runtime statistics in L1,MAC,RRC,PDCP files +""" + import subprocess import time import shlex import re import sys -import matplotlib.pyplot as plt import pickle +import matplotlib.pyplot as plt import numpy as np -import os import yaml -class Stat_Monitor(): +class StatMonitor(): def __init__(self,): - with open('stats_monitor_conf.yaml','r') as f: - self.d = yaml.load(f) + with open('stats_monitor_conf.yaml','r') as file: + self.d = yaml.load(file) 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) + for line in output: + tmp=line.decode("utf-8") + result=re.match(r'^.*\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))) @@ -32,9 +35,9 @@ class Stat_Monitor(): 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) + for line in output: + tmp=line.decode("utf-8") + result=re.match(r'^.*\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))) @@ -42,9 +45,6 @@ class Stat_Monitor(): 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' @@ -55,12 +55,12 @@ class Stat_Monitor(): if node_type=='enb': self.process_enb(node_type,output) else: #'gnb' - self.process_gnb(node_type,output) + 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)) + 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) @@ -71,7 +71,7 @@ class Stat_Monitor(): 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') @@ -80,21 +80,19 @@ class Stat_Monitor(): if __name__ == "__main__": - node_type = sys.argv[1]#enb or gnb - mon=Stat_Monitor() + node = sys.argv[1]#enb or gnb + mon=StatMonitor() #collecting stats when modem process is stopped - cmd='ps aux | grep mode | grep -v grep' - process=subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) + 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) + mon.collect(node) + 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: + with open(node+'_stats_monitor.pickle', 'wb') as handle: pickle.dump(mon.d, handle, protocol=pickle.HIGHEST_PROTOCOL) - mon.graph(node_type) - - + mon.graph(node) From 010e0cca1b8800878de26ac6a402061017cd6c37 Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 14 Oct 2021 11:11:49 +0200 Subject: [PATCH 5/7] bring ulsch and dlsch stats for gnb --- ci-scripts/stats_monitor.py | 149 +++++++++++++++-------------- ci-scripts/stats_monitor.py.old | 94 ++++++++++++++++++ ci-scripts/stats_monitor_conf.yaml | 8 +- ci-scripts/stats_monitor_dev.py | 19 ++-- 4 files changed, 187 insertions(+), 83 deletions(-) create mode 100755 ci-scripts/stats_monitor.py.old diff --git a/ci-scripts/stats_monitor.py b/ci-scripts/stats_monitor.py index ae9b39bfa6..83de20f5d2 100755 --- a/ci-scripts/stats_monitor.py +++ b/ci-scripts/stats_monitor.py @@ -1,94 +1,101 @@ +""" +To create graphs and pickle from runtime statistics in L1,MAC,RRC,PDCP files +""" + import subprocess import time import shlex import re import sys -import matplotlib.pyplot as plt import pickle +import matplotlib.pyplot as plt import numpy as np -import os - -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: - 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: - d['PHR'].append(int(result.group(1))) - d['bler'].append(float(result.group(2))) - d['mcsoff'].append(int(result.group(3))) - d['mcs'].append(int(result.group(4))) +import yaml -def graph(d, node_type): +class StatMonitor(): + def __init__(self,): + with open('stats_monitor_conf.yaml','r') as file: + self.d = yaml.load(file) + for node in self.d: + for metric in self.d[node]: + self.d[node][metric]=[] - figure, axis = plt.subplots(4, 1,figsize=(10, 10)) + def process_gnb (self,node_type,output): + for line in output: + tmp=line.decode("utf-8") + result=re.match(r'^.*\bdlsch_rounds\b ([0-9]+)\/([0-9]+).*\bdlsch_errors\b ([0-9]+)',tmp) + if result is not None: + self.d[node_type]['dlsch_err'].append(int(result.group(3))) + percentage=float(result.group(2))/float(result.group(1)) + self.d[node_type]['dlsch_err_perc_round_1'].append(percentage) + result=re.match(r'^.*\bulsch_rounds\b ([0-9]+)\/([0-9]+).*\bulsch_errors\b ([0-9]+)',tmp) + if result is not None: + self.d[node_type]['ulsch_err'].append(int(result.group(3))) + percentage=float(result.group(2))/float(result.group(1)) + self.d[node_type]['ulsch_err_perc_round_1'].append(percentage) - major_ticks = np.arange(0, len(d['PHR'])+1, 1) - axis[0].set_xticks(major_ticks) - axis[0].set_xticklabels([]) - axis[0].plot(d['PHR'],marker='o') - axis[0].set_xlabel('time') - axis[0].set_ylabel('PHR') - axis[0].set_title("PHR") - - major_ticks = np.arange(0, len(d['bler'])+1, 1) - axis[1].set_xticks(major_ticks) - axis[1].set_xticklabels([]) - axis[1].plot(d['bler'],marker='o') - axis[1].set_xlabel('time') - axis[1].set_ylabel('bler') - axis[1].set_title("bler") - major_ticks = np.arange(0, len(d['mcsoff'])+1, 1) - axis[2].set_xticks(major_ticks) - axis[2].set_xticklabels([]) - axis[2].plot(d['mcsoff'],marker='o') - axis[2].set_xlabel('time') - axis[2].set_ylabel('mcsoff') - axis[2].set_title("mcsoff") + def process_enb (self,node_type,output): + for line in output: + tmp=line.decode("utf-8") + result=re.match(r'^.*\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))) - major_ticks = np.arange(0, len(d['mcs'])+1, 1) - axis[3].set_xticks(major_ticks) - axis[3].set_xticklabels([]) - axis[3].plot(d['mcs'],marker='o') - axis[3].set_xlabel('time') - axis[3].set_ylabel('mcs') - axis[3].set_title("mcs") - plt.tight_layout() - # Combine all the operations and display - plt.savefig(node_type+'_stats_monitor.png') - plt.show() + 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 + node = sys.argv[1]#enb or gnb + mon=StatMonitor() - d={} - d['PHR']=[] - d['bler']=[] - d['mcsoff']=[] - d['mcs']=[] - - - cmd='ps aux | grep modem | grep -v grep' - process=subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) + #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 : - collect(d, node_type) - process=subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) + mon.collect(node) + 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(d, handle, protocol=pickle.HIGHEST_PROTOCOL) - graph(d, node_type) - - + print('Process stopped') + with open(node+'_stats_monitor.pickle', 'wb') as handle: + pickle.dump(mon.d, handle, protocol=pickle.HIGHEST_PROTOCOL) + mon.graph(node) diff --git a/ci-scripts/stats_monitor.py.old b/ci-scripts/stats_monitor.py.old new file mode 100755 index 0000000000..ae9b39bfa6 --- /dev/null +++ b/ci-scripts/stats_monitor.py.old @@ -0,0 +1,94 @@ +import subprocess +import time +import shlex +import re +import sys +import matplotlib.pyplot as plt +import pickle +import numpy as np +import os + +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: + 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: + d['PHR'].append(int(result.group(1))) + d['bler'].append(float(result.group(2))) + d['mcsoff'].append(int(result.group(3))) + d['mcs'].append(int(result.group(4))) + + +def graph(d, node_type): + + + figure, axis = plt.subplots(4, 1,figsize=(10, 10)) + + major_ticks = np.arange(0, len(d['PHR'])+1, 1) + axis[0].set_xticks(major_ticks) + axis[0].set_xticklabels([]) + axis[0].plot(d['PHR'],marker='o') + axis[0].set_xlabel('time') + axis[0].set_ylabel('PHR') + axis[0].set_title("PHR") + + major_ticks = np.arange(0, len(d['bler'])+1, 1) + axis[1].set_xticks(major_ticks) + axis[1].set_xticklabels([]) + axis[1].plot(d['bler'],marker='o') + axis[1].set_xlabel('time') + axis[1].set_ylabel('bler') + axis[1].set_title("bler") + + major_ticks = np.arange(0, len(d['mcsoff'])+1, 1) + axis[2].set_xticks(major_ticks) + axis[2].set_xticklabels([]) + axis[2].plot(d['mcsoff'],marker='o') + axis[2].set_xlabel('time') + axis[2].set_ylabel('mcsoff') + axis[2].set_title("mcsoff") + + major_ticks = np.arange(0, len(d['mcs'])+1, 1) + axis[3].set_xticks(major_ticks) + axis[3].set_xticklabels([]) + axis[3].plot(d['mcs'],marker='o') + axis[3].set_xlabel('time') + axis[3].set_ylabel('mcs') + axis[3].set_title("mcs") + + 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 + + d={} + d['PHR']=[] + d['bler']=[] + d['mcsoff']=[] + d['mcs']=[] + + + cmd='ps aux | grep modem | grep -v grep' + process=subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) + output = process.stdout.readlines() + while len(output)!=0 : + 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(node_type+'_stats_monitor.pickle', 'wb') as handle: + pickle.dump(d, handle, protocol=pickle.HIGHEST_PROTOCOL) + graph(d, node_type) + + diff --git a/ci-scripts/stats_monitor_conf.yaml b/ci-scripts/stats_monitor_conf.yaml index 3da7c1e8ba..6c0a2b0225 100644 --- a/ci-scripts/stats_monitor_conf.yaml +++ b/ci-scripts/stats_monitor_conf.yaml @@ -5,7 +5,7 @@ enb : mcs: gnb : - PHR: - bler: - mcsoff: - mcs: \ No newline at end of file + dlsch_err: + dlsch_err_perc_round_1: + ulsch_err: + ulsch_err_perc_round_1: \ No newline at end of file diff --git a/ci-scripts/stats_monitor_dev.py b/ci-scripts/stats_monitor_dev.py index 44f79dfb73..83de20f5d2 100755 --- a/ci-scripts/stats_monitor_dev.py +++ b/ci-scripts/stats_monitor_dev.py @@ -22,19 +22,22 @@ class StatMonitor(): self.d[node][metric]=[] - def process_enb (self,node_type,output): + def process_gnb (self,node_type,output): for line in output: tmp=line.decode("utf-8") - result=re.match(r'^.*\bPHR\b ([0-9]+).+\bbler\b ([0-9]+\.[0-9]+).+\bmcsoff\b ([0-9]+).+\bmcs\b ([0-9]+)',tmp) + result=re.match(r'^.*\bdlsch_rounds\b ([0-9]+)\/([0-9]+).*\bdlsch_errors\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))) + self.d[node_type]['dlsch_err'].append(int(result.group(3))) + percentage=float(result.group(2))/float(result.group(1)) + self.d[node_type]['dlsch_err_perc_round_1'].append(percentage) + result=re.match(r'^.*\bulsch_rounds\b ([0-9]+)\/([0-9]+).*\bulsch_errors\b ([0-9]+)',tmp) + if result is not None: + self.d[node_type]['ulsch_err'].append(int(result.group(3))) + percentage=float(result.group(2))/float(result.group(1)) + self.d[node_type]['ulsch_err_perc_round_1'].append(percentage) - - def process_gnb (self,node_type,output): + def process_enb (self,node_type,output): for line in output: tmp=line.decode("utf-8") result=re.match(r'^.*\bPHR\b ([0-9]+).+\bbler\b ([0-9]+\.[0-9]+).+\bmcsoff\b ([0-9]+).+\bmcs\b ([0-9]+)',tmp) From f462417b0565ab0f29e2028d3ae1689fb1915d7a Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 14 Oct 2021 11:11:49 +0200 Subject: [PATCH 6/7] update runtime stats graphs --- ci-scripts/ran.py | 7 ++++--- ci-scripts/stats_monitor.py | 9 +++++---- ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 43ae3bf5c0..79609c78f4 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -483,12 +483,13 @@ class RANManagement(): #stats monitoring during runtime time.sleep(20) - monitor_file='stats_monitor.py' + monitor_file='../ci-scripts/stats_monitor.py' + conf_file='../ci-scripts/stats_monitor_conf.yaml' if self.eNB_Stats=='yes': 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) + mySSH.command('echo $USER; nohup python3 ' + monitor_file + ' ' + conf_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) + mySSH.command('echo $USER; nohup python3 ' + monitor_file + ' ' + conf_file + ' gnb 2>&1 > gnb_stats_monitor_execution.log &', '\$', 5) diff --git a/ci-scripts/stats_monitor.py b/ci-scripts/stats_monitor.py index 83de20f5d2..877194de59 100755 --- a/ci-scripts/stats_monitor.py +++ b/ci-scripts/stats_monitor.py @@ -14,8 +14,8 @@ import yaml class StatMonitor(): - def __init__(self,): - with open('stats_monitor_conf.yaml','r') as file: + def __init__(self,cfg_file): + with open(cfg_file,'r') as file: self.d = yaml.load(file) for node in self.d: for metric in self.d[node]: @@ -83,8 +83,9 @@ class StatMonitor(): if __name__ == "__main__": - node = sys.argv[1]#enb or gnb - mon=StatMonitor() + cfg_filename = sys.argv[1] #yaml file as metrics config + node = sys.argv[2]#enb or gnb + mon=StatMonitor(cfg_filename) #collecting stats when modem process is stopped CMD='ps aux | grep mode | grep -v grep' diff --git a/ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml b/ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml index ae5f11c975..03dea36607 100644 --- a/ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml +++ b/ci-scripts/xml_files/fr1_nsa_2x2_quectel.xml @@ -122,8 +122,8 @@ Iperf - iperf (UL/1Mbps/UDP)(60 sec)(single-ue profile) - -u -b 1M -t 60 + iperf (UL/1Mbps/UDP)(20 sec)(single-ue profile) + -u -b 1M -t 20 UL nrmodule2_quectel 5 From 41bf35a605d0bf09eddaab91d5074efa233e336c Mon Sep 17 00:00:00 2001 From: hardy Date: Thu, 14 Oct 2021 14:15:51 +0200 Subject: [PATCH 7/7] fix stats monitor pickle filename --- ci-scripts/ran.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index 79609c78f4..ccbc35930e 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -705,7 +705,7 @@ class RANManagement(): #debug / tentative mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './nrL1_stats.log', self.eNBSourceCodePath + '/cmake_targets/') mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './nrMAC_stats.log', self.eNBSourceCodePath + '/cmake_targets/') - mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './gnb_stats_monitor.pickle.pickle', self.eNBSourceCodePath + '/cmake_targets/') + mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './gnb_stats_monitor.pickle', self.eNBSourceCodePath + '/cmake_targets/') mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './gnb_stats_monitor.png', self.eNBSourceCodePath + '/cmake_targets/') # mySSH.copyout(self.eNBIPAddress, self.eNBUserName, self.eNBPassword, './' + fileToAnalyze, self.eNBSourceCodePath + '/cmake_targets/')