diff --git a/main.cpp b/main.cpp index 136df7fa..d155df69 100644 --- a/main.cpp +++ b/main.cpp @@ -929,10 +929,6 @@ int main(int argc, char *argv[]) options.snaplen = MAXPCKTSIZE; } - if (!options.print_stats) { - plugin_wrapper.plugins.push_back(new StatsPlugin(options.cache_stats_interval, cout)); - } - FlowExporter *exporter; if (export_unirec) { #ifdef WITH_NEMEA @@ -963,6 +959,10 @@ int main(int argc, char *argv[]) return error("Unable to initialize ring buffer."); } + if (!options.print_stats) { + plugin_wrapper.plugins.push_back(new StatsPlugin(options.cache_stats_interval, cout)); + } + std::vector pipelines; std::vector exporters; std::vector> inputFutures;