]> arthur.barton.de Git - netdata.git/commitdiff
Command line options: mark -l (history) deprecated
authorSimon Nagl <simonnagl@aim.com>
Mon, 23 May 2016 20:29:30 +0000 (22:29 +0200)
committerSimon Nagl <simonnagl@aim.com>
Mon, 23 May 2016 20:29:30 +0000 (22:29 +0200)
For reasons why read #421

src/main.c

index 71f6ea964bc3f89eb54a6465731601bbdafab452..dd68a599b6f6d4b6787ba03c02fa7f80cd9b6119 100644 (file)
@@ -201,8 +201,6 @@ struct option_def options[] = {
        {'s', "Path to access host /proc and /sys when running in a container.", "PATH",                                 NULL},
        {'t', "The frequency in seconds, for data collection. \
 Same as 'update every' config file option.",                                 "seconds",                              "1"},
-       {'l', "The number of entries the netdata daemon will keep in memory \
-for each chart dimension. Same as 'history config file option.",             "lines_to_save",                        NULL},
        {'u', "System username to run as.",                                      "username",                             "netdata"},
        {'v', "Version of the program",                                          NULL,                                   NULL},
        {'W', "vendor options.",                                                 "stacksize=<size>|unittest|debug_flag", NULL},
@@ -295,6 +293,11 @@ int main(int argc, char **argv)
                                fprintf(stderr, "%s: deprecate option -- %s -- please use -s instead.\n", argv[0], argv[i]);
                                remove_option(i, &argc, argv);
                        }
+                       else if(strcmp(argv[i], "-l") == 0 && (i+1) < argc) {
+                               config_set("global", "history", argv[i+1]);
+                               fprintf(stderr, "%s: deprecate option -- %s -- This option will be rmoved with V2.*.\n", argv[0], argv[i]);
+                               remove_option(i, &argc, argv);
+                       }
                        else i++;
                }
        }
@@ -357,9 +360,6 @@ int main(int argc, char **argv)
                                        printf("netdata 1.1.0\n");
                                        return 0;
                                        break;
-                               case 'l':
-                                       config_set("global", "history", optarg);
-                                       break;
                                case 'W': 
                                        {
                                                char* stacksize = "stacksize=";