Added command to forcefully flush the buffers on srsenb and srsue.

master
Pedro Alvarez 3 years ago
parent 0b948d4098
commit 7155de91ca

@ -495,6 +495,13 @@ static void execute_cmd(metrics_stdout* metrics, srsenb::enb_command_interface*
// Set cell gain // Set cell gain
control->cmd_cell_gain(cell_id, gain_db); control->cmd_cell_gain(cell_id, gain_db);
} else if (cmd[0] == "flush") {
if (cmd.size() != 1) {
cout << "Usage: " << cmd[0] << endl;
return;
}
srslog::flush();
cout << "Flushed log file buffers" << endl;
} else { } else {
cout << "Available commands: " << endl; cout << "Available commands: " << endl;
cout << " t: starts console trace" << endl; cout << " t: starts console trace" << endl;
@ -502,6 +509,7 @@ static void execute_cmd(metrics_stdout* metrics, srsenb::enb_command_interface*
cout << " cell_gain: set relative cell gain" << endl; cout << " cell_gain: set relative cell gain" << endl;
cout << " sleep: pauses the commmand line operation for a given time in seconds" << endl; cout << " sleep: pauses the commmand line operation for a given time in seconds" << endl;
cout << " p: starts MAC padding" << endl; cout << " p: starts MAC padding" << endl;
cout << " flush: flushes the buffers for the log file" << endl;
cout << endl; cout << endl;
} }
} }

@ -645,6 +645,9 @@ static void* input_loop(void*)
} else if (key == "rlf") { } else if (key == "rlf") {
simulate_rlf.store(true, std::memory_order_relaxed); simulate_rlf.store(true, std::memory_order_relaxed);
cout << "Sending Radio Link Failure" << endl; cout << "Sending Radio Link Failure" << endl;
} else if (key == "flush") {
srslog::flush();
cout << "Flushed log file buffers" << endl;
} else if (key == "q") { } else if (key == "q") {
// let the signal handler do the job // let the signal handler do the job
raise(SIGTERM); raise(SIGTERM);

Loading…
Cancel
Save