@@ -84,7 +84,7 @@ print_help()
8484{
8585 std::cout
8686 << " IPFIX Collector daemon\n "
87- << " Usage: ipfixcol [-c FILE] [-p PATH] [-e DIR] [-P FILE] [-vVhd ]\n "
87+ << " Usage: ipfixcol2 [-c FILE] [-p PATH] [-e DIR] [-P FILE] [-r SIZE] [-vVhdu ]\n "
8888 << " -c FILE Path to the startup configuration file\n "
8989 << " (default: " << IPX_DEFAULT_STARTUP_CONFIG << " )\n "
9090 << " -p PATH Add path to a directory with plugins or to a file\n "
@@ -97,7 +97,8 @@ print_help()
9797 << " -h Show this help message and exit\n "
9898 << " -V Show version information and exit\n "
9999 << " -v Increase verbosity level (by default, show only error messages)\n "
100- << " (can be used up to 3 times to add warning/info/debug messages)\n " ;
100+ << " (can be used up to 3 times to add warning/info/debug messages)\n "
101+ << " -u Disable plugins unload on exit (only for plugin developers)\n " ;
101102}
102103
103104/* *
@@ -206,7 +207,7 @@ int main(int argc, char *argv[])
206207 // Parse configuration
207208 int opt;
208209 opterr = 0 ; // Disable default error messages
209- while ((opt = getopt (argc, argv, " c:vVhdp:e:P:r:" )) != -1 ) {
210+ while ((opt = getopt (argc, argv, " c:vVhdp:e:P:r:u " )) != -1 ) {
210211 switch (opt) {
211212 case ' c' : // Configuration file
212213 cfg_startup = optarg;
@@ -220,21 +221,24 @@ int main(int argc, char *argv[])
220221 case ' h' : // Help
221222 print_help ();
222223 return EXIT_SUCCESS;
223- case ' d' :
224+ case ' d' : // Run as a standalone process (daemon)
224225 daemon_en = true ;
225226 break ;
226227 case ' p' : // Plugin search path
227228 conf.finder .path_add (std::string (optarg));
228229 break ;
229- case ' e' :
230+ case ' e' : // Redefine path to Information Elements definition
230231 cfg_iedir = optarg;
231232 break ;
232- case ' P' :
233+ case ' P' : // Create a PID file
233234 pid_file = optarg;
234235 break ;
235- case ' r' :
236+ case ' r' : // Change ring size
236237 ring_size = optarg;
237238 break ;
239+ case ' u' : // Disable automatic plugin unload
240+ conf.finder .auto_unload (false );
241+ break ;
238242 default : // ?
239243 std::cerr << " Unknown parameter '" << static_cast <char >(optopt) << " '!" << std::endl;
240244 return EXIT_FAILURE;
0 commit comments