fixing tshark termination ; zip of QLog file

This commit is contained in:
hardy
2021-06-09 15:51:07 +02:00
parent 688cb7ae4e
commit 2c2d8bbf62
2 changed files with 7 additions and 3 deletions
+3 -3
View File
@@ -154,9 +154,9 @@ class Module_UE:
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
#archive qlog to /opt/ci_qlogs with datetime suffix
now=datetime.now()
now_string = now.strftime("%Y/%m/%d-%H:%M")
now_string = now.strftime("%Y%m%d-%H%M")
source='ci_qlog'
destination='/opt/ci_qlogs/ci_qlog_'+now_string
mySSH.command('echo ' + self.HostPassword + ' | sudo -S cp -r '+source+' '+destination,'\$', 20)
destination='/opt/ci_qlogs/ci_qlog_'+now_string+'.zip'
mySSH.command('echo $USER; echo ' + self.HostPassword + ' | nohup sudo -S zip -r '+destination+' '+source+' &','\$', 10)
mySSH.close()
return destination
+4
View File
@@ -594,6 +594,10 @@ class RANManagement():
mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL -r .*-softmodem ocp-enb || true', '\$', 5)
time.sleep(5)
mySSH.command('rm -f my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
#stopping tshark on eNB side
logging.debug('\u001B[1m Stopping tshark \u001B[0m')
mySSH.command('echo ' + lPassWord + ' | sudo -S killall --signal SIGKILL tshark', '\$', 5)
time.sleep(1)
mySSH.close()
# If tracer options is on, stopping tshark on EPC side
result = re.search('T_stdout', str(self.Initialize_eNB_args))