* Usage of the program */
| 51 | * Usage of the program |
| 52 | */ |
| 53 | void Usage(char *prog) { |
| 54 | cout << "Usage: " << prog << " <options>" << endl; |
| 55 | cout << endl << " REQUIRED OPTIONS:" << endl; |
| 56 | cout << " -c <filename> Config filename. " << endl; |
| 57 | cout << " OR " << endl; |
| 58 | cout << " -a <string> Admin ID for collector, this must be unique for this collector. hostname or IP is good to use" << endl; |
| 59 | cout << endl; |
| 60 | |
| 61 | cout << endl << " OPTIONAL OPTIONS:" << endl; |
| 62 | cout << " -pid <filename> PID filename, default is no pid file" << endl; |
| 63 | cout << " -l <filename> Log filename, default is STDOUT" << endl; |
| 64 | cout << " -d <filename> Debug filename, default is log filename" << endl; |
| 65 | cout << " -f Run in foreground instead of daemon (use for upstart)" << endl; |
| 66 | |
| 67 | cout << endl << " OTHER OPTIONS:" << endl; |
| 68 | cout << " -v Version" << endl; |
| 69 | cout << " -h Help" << endl; |
| 70 | |
| 71 | |
| 72 | cout << endl << " DEBUG OPTIONS:" << endl; |
| 73 | cout << " -debug" "Debug general items" << endl; |
| 74 | cout << " -dbgp Debug BGP parser" << endl; |
| 75 | cout << " -dbmp Debug BMP parser" << endl; |
| 76 | cout << " -dmsgbus Debug message bus" << endl; |
| 77 | |
| 78 | cout << endl << " DEPRECATED OPTIONS:" << endl; |
| 79 | cout << endl << " These options will be removed in a future release. You should switch to use the config file." << endl; |
| 80 | cout << " -k <host:port> Kafka broker list format: host:port[,...]" << endl; |
| 81 | cout << " Default is 127.0.0.1:9092" << endl; |
| 82 | cout << " -m <mode> Mode can be 'v4, v6, or v4v6'" << endl; |
| 83 | cout << " Default is v4. Enables IPv4 and/or IPv6 BMP listening port" << endl; |
| 84 | cout << endl; |
| 85 | cout << " -p <port> BMP listening port (default is 5000)" << endl; |
| 86 | cout << " -b <MB> BMP read buffer per router size in MB (default is 15), range is 2 - 128" << endl; |
| 87 | cout << " -hi <minutes> Collector message heartbeat interval in minutes (default is 5 minutes)" << endl; |
| 88 | |
| 89 | cout << endl; |
| 90 | } |
| 91 | /** |
| 92 | * Daemonize the program |
| 93 | */ |