Putting back SIGINT detection for lte-softmodem and initial skeleton to retrieve runtime stats from eNB/gNB
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
@@ -698,7 +698,30 @@ class RANManagement():
|
||||
X2HO_inNbProcedures = 0
|
||||
X2HO_outNbProcedures = 0
|
||||
global_status = CONST.ALL_PROCESSES_OK
|
||||
# Runtime statistics
|
||||
runTime = ''
|
||||
userTime = ''
|
||||
systemTime = ''
|
||||
maxPhyMemUsage = ''
|
||||
nbContextSwitches = ''
|
||||
for line in enb_log_file.readlines():
|
||||
# Runtime statistics
|
||||
result = re.search('Run time:' ,str(line))
|
||||
if result is not None:
|
||||
runTime = str(line).strip()
|
||||
if runTime != '':
|
||||
result = re.search('Time executing user inst', str(line))
|
||||
if result is not None:
|
||||
userTime = 'to be decoded - 1'
|
||||
result = re.search('Time executing system inst', str(line))
|
||||
if result is not None:
|
||||
systemTime = 'to be decoded - 2'
|
||||
result = re.search('Max. Phy. memory usage:', str(line))
|
||||
if result is not None:
|
||||
maxPhyMemUsage = 'to be decoded - 3'
|
||||
result = re.search('Number of context switch.*process origin', str(line))
|
||||
if result is not None:
|
||||
nbContextSwitches = 'to be decoded - 4'
|
||||
if X2HO_state == CONST.X2_HO_REQ_STATE__IDLE:
|
||||
result = re.search('target eNB Receives X2 HO Req X2AP_HANDOVER_REQ', str(line))
|
||||
if result is not None:
|
||||
@@ -955,4 +978,11 @@ class RANManagement():
|
||||
global_status = CONST.ENB_PROCESS_REALTIME_ISSUE
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.HmleNBFailureMsg=htmleNBFailureMsg
|
||||
# Runtime statistics
|
||||
if runTime != '':
|
||||
logging.debug(runTime)
|
||||
logging.debug('Time executing user inst : ' + userTime)
|
||||
logging.debug('Time executing system inst : ' + systemTime)
|
||||
logging.debug('Max Physical Memory Usage : ' + maxPhyMemUsage)
|
||||
logging.debug('Nb Context Switches : ' + nbContextSwitches)
|
||||
return global_status
|
||||
|
||||
@@ -116,7 +116,9 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
|
||||
/* some sanity check - to be refined at some point */
|
||||
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
|
||||
X2AP_ERROR("x2ap_enb_data_p not NULL and sctp state not SCTP_STATE_ESTABLISHED, what to do?\n");
|
||||
abort();
|
||||
// Allow for a gracious exit when we kill first the gNB, then the eNB
|
||||
//abort();
|
||||
return;
|
||||
}
|
||||
|
||||
x2ap_enb_data_p->in_streams = sctp_new_association_resp->in_streams;
|
||||
|
||||
@@ -556,6 +556,8 @@ int main ( int argc, char **argv )
|
||||
|
||||
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
|
||||
init_opt();
|
||||
// to make a graceful exit when ctrl-c is pressed
|
||||
set_softmodem_sighandler();
|
||||
check_clock();
|
||||
#ifndef PACKAGE_VERSION
|
||||
# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL"
|
||||
|
||||
Reference in New Issue
Block a user