diff options
-rw-r--r-- | nfvbench/nfvbench.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nfvbench/nfvbench.py b/nfvbench/nfvbench.py index da069bf..19c402f 100644 --- a/nfvbench/nfvbench.py +++ b/nfvbench/nfvbench.py @@ -576,6 +576,12 @@ def _parse_opts_from_cli(): default=None, help='Change json/log files ownership with this group (int)') + parser.add_argument('--show-trex-log', dest='show_trex_log', + default=None, + action='store_true', + help='Show the current TRex local server log file contents' + + ' => diagnostic/help in case of configuration problems') + parser.add_argument('--debug-mask', dest='debug_mask', type=int_arg, metavar='<mask>', @@ -687,6 +693,14 @@ def main(): print((default_cfg.decode("utf-8"))) sys.exit(0) + # dump the contents of the trex log file + if opts.show_trex_log: + try: + print(open('/tmp/trex.log').read(), end="") + except FileNotFoundError: + print("No TRex log file found!") + sys.exit(0) + config.name = '' if opts.config: # do not check extra_specs in flavor as it can contain any key/value pairs |