+ else if(strcmp("-h", argv[i]) == 0 || strcmp("--help", argv[i]) == 0) {
+ fprintf(stderr,
+ "\n"
+ "netdata freeipmi.plugin " VERSION "\n"
+ "Usage:\n"
+ "\n"
+ " freeipmi.plugin [OPTIONS]\n"
+ "\n"
+ "Available options:\n"
+ " NUMBER, sets the data collection frequency\n"
+ " debug, enables verbose output\n"
+ " hostname X, sets the remote host to connect to\n"
+ " username X, sets the username to authenticate at the remote host\n"
+ " password X, sets the password to authenticate at the remote host\n"
+ " sdr-cache-dir X, sets the directory to save SDR cache files\n"
+ " sensor-config-file X, set the filename to read sensor configuration\n"
+ );
+ exit(1);
+ }
+ else if(i < argc && strcmp("hostname", argv[i]) == 0) {
+ hostname = argv[++i];
+ if(debug) fprintf(stderr, "freeipmi.plugin: hostname set to '%s'\n", hostname);
+ continue;
+ }
+ else if(i < argc && strcmp("username", argv[i]) == 0) {
+ username = argv[++i];
+ if(debug) fprintf(stderr, "freeipmi.plugin: username set to '%s'\n", username);
+ continue;
+ }
+ else if(i < argc && strcmp("password", argv[i]) == 0) {
+ password = argv[++i];
+ if(debug) fprintf(stderr, "freeipmi.plugin: password set to '%s'\n", password);
+ continue;
+ }
+ else if(i < argc && strcmp("sdr-cache-dir", argv[i]) == 0) {
+ sdr_cache_directory = argv[++i];
+ if(debug) fprintf(stderr, "freeipmi.plugin: SDR cache directory set to '%s'\n", sdr_cache_directory);
+ continue;
+ }
+ else if(i < argc && strcmp("sensor-config-file", argv[i]) == 0) {
+ sensor_config_file = argv[++i];
+ if(debug) fprintf(stderr, "freeipmi.plugin: sensor config file set to '%s'\n", sensor_config_file);
+ continue;
+ }