diff --git a/app/cli-functions.c b/app/cli-functions.c index 204e1a56..dfa49aad 100644 --- a/app/cli-functions.c +++ b/app/cli-functions.c @@ -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[] = { "", @@ -1691,7 +1691,7 @@ static const char *misc_help[] = { #endif "geometry - Show the display geometry Columns by Rows (ColxRow)", "clear stats - Clear the statistics", - "clr - Clear all Statistices", + "clr - Clear all statistics", "reset - 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", @@ -2170,7 +2170,7 @@ static struct cli_map latency_map[] = { static const char *latency_help[] = { "", - "latency rate - Rate in milli-seonds to send a latency packet", + "latency rate - Rate in milli-seconds to send a latency packet", "latency entropy - Entropy value to adjust the src-port by (SPORT + (i % N)) (default: 1)", " e.eg. latency 0 entropy 16", CLI_HELP_PAUSE, diff --git a/app/pktgen-main.c b/app/pktgen-main.c index 839ae734..da2dc5e1 100644 --- a/app/pktgen-main.c +++ b/app/pktgen-main.c @@ -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. */ diff --git a/cfg/four-ports.cfg b/cfg/four-ports.cfg index e5122848..817e8a4a 100644 --- a/cfg/four-ports.cfg +++ b/cfg/four-ports.cfg @@ -58,4 +58,6 @@ run = { ), 'theme': 'themes/black-yellow.theme', +# 'loadfile': 'test/portstats_with_delay.lua', + 'loadfile': 'test/portstats.lua', } diff --git a/themes/black-yellow.theme b/themes/black-yellow.theme index 7636894b..5b7f8389 100644 --- a/themes/black-yellow.theme +++ b/themes/black-yellow.theme @@ -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 diff --git a/themes/white-black.theme b/themes/white-black.theme index 1f01444f..de04aea6 100644 --- a/themes/white-black.theme +++ b/themes/white-black.theme @@ -22,4 +22,3 @@ theme stats.ip cyan none bold theme pktgen.prompt green none off theme on cls -on