Skip to content

Commit

Permalink
cleanup screen output with scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Wiles <[email protected]>
  • Loading branch information
KeithWiles authored and pktgen committed Mar 31, 2024
1 parent c26597f commit 8645141
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app/cli-functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ static struct cli_map start_map[] = {
{70, "stop %P latsampler"},
{-1, NULL}
};
// clagn-format on
// clang-format on

static const char *start_help[] = {
"",
Expand Down Expand Up @@ -1691,7 +1691,7 @@ static const char *misc_help[] = {
#endif
"geometry - Show the display geometry Columns by Rows (ColxRow)",
"clear <portlist> stats - Clear the statistics",
"clr - Clear all Statistices",
"clr - Clear all statistics",
"reset <portlist> - Reset the configuration the ports to the default",
"rst - Reset the configuration for all ports",
"ports per page [1-6] - Set the number of ports displayed per page",
Expand Down Expand Up @@ -2170,7 +2170,7 @@ static struct cli_map latency_map[] = {

static const char *latency_help[] = {
"",
"latency <portlist> rate <value> - Rate in milli-seonds to send a latency packet",
"latency <portlist> rate <value> - Rate in milli-seconds to send a latency packet",
"latency <portlist> entropy <value> - Entropy value to adjust the src-port by (SPORT + (i % N)) (default: 1)",
" e.eg. latency 0 entropy 16",
CLI_HELP_PAUSE,
Expand Down
6 changes: 5 additions & 1 deletion app/pktgen-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,11 @@ main(int argc, char **argv)
sigaddset(&set, SIGWINCH);
pthread_sigmask(SIG_UNBLOCK, &set, NULL);

cli_start(NULL);
/* execute the command files if present */
scrn_resume();
cli_execute_cmdfiles();

cli_start(NULL); /* Start accepting input from user */

scrn_pause();
scrn_setw(1); /* Reset the window size, from possible crash run. */
Expand Down
2 changes: 2 additions & 0 deletions cfg/four-ports.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ run = {
),

'theme': 'themes/black-yellow.theme',
# 'loadfile': 'test/portstats_with_delay.lua',
'loadfile': 'test/portstats.lua',
}
2 changes: 1 addition & 1 deletion themes/black-yellow.theme
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ theme stats.bdf blue none off
theme stats.mac green none off
theme stats.ip cyan none off
theme pktgen.prompt green none off
theme on
cls
on
1 change: 0 additions & 1 deletion themes/white-black.theme
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ theme stats.ip cyan none bold
theme pktgen.prompt green none off
theme on
cls
on

0 comments on commit 8645141

Please sign in to comment.