Command line options: mark -l (history) deprecated
For reasons why read #421
Simon Nagl committed
May 23, 2016 at 22:29 UTC
9ef0d64956628cf89d2af1c1c9950a7338030335
1 file changed
+5
-5
src/main.c
+5
-5
@@ -201,8 +201,6 @@ struct option_def options[] = {
201
{'s', "Path to access host /proc and /sys when running in a container.", "PATH", NULL},
202
{'t', "The frequency in seconds, for data collection. \
203
Same as 'update every' config file option.", "seconds", "1"},
204
- {'l', "The number of entries the netdata daemon will keep in memory \
205
-for each chart dimension. Same as 'history config file option.", "lines_to_save", NULL},
204
{'u', "System username to run as.", "username", "netdata"},
205
{'v', "Version of the program", NULL, NULL},
206
{'W', "vendor options.", "stacksize=<size>|unittest|debug_flag", NULL},
@@ -295,6 +293,11 @@ int main(int argc, char **argv)
293
fprintf(stderr, "%s: deprecate option -- %s -- please use -s instead.\n", argv[0], argv[i]);
294
remove_option(i, &argc, argv);
295
}
296
+ else if(strcmp(argv[i], "-l") == 0 && (i+1) < argc) {
297
+ config_set("global", "history", argv[i+1]);
298
+ fprintf(stderr, "%s: deprecate option -- %s -- This option will be rmoved with V2.*.\n", argv[0], argv[i]);
299
+ remove_option(i, &argc, argv);
300
+ }
301
else i++;
302
}
303
}
@@ -357,9 +360,6 @@ int main(int argc, char **argv)
360
printf("netdata 1.1.0\n");
361
return 0;
362
break;
360
- case 'l':
361
- config_set("global", "history", optarg);
362
- break;
363
case 'W':
364
{
365
char* stacksize = "stacksize=";