]> arthur.barton.de Git - netdata.git/blobdiff - src/main.c
update nfacct plugin to match current netdata development
[netdata.git] / src / main.c
index 86bd8604be39ba7b6687ed584f4ab88760e5e01c..a72585e28377a1157bcae85459bc73176b14d8d3 100644 (file)
@@ -230,6 +230,7 @@ struct option_def options[] = {
     { 't', "The internal clock of netdata.",              "seconds",     "1"},
     { 'u', "Run as user.",                                "username",    "netdata"},
     { 'v', "Print netdata version and exit.",             NULL,          NULL},
+    { 'V', "Print netdata version and exit.",             NULL,          NULL},
     { 'W', "See Advanced options below.",                 "options",     NULL},
 };
 
@@ -365,7 +366,10 @@ static void backwards_compatible_config() {
         web_server_mode = (mode)?WEB_SERVER_MODE_MULTI_THREADED:WEB_SERVER_MODE_SINGLE_THREADED;
     }
 
-    // move [global] options to the [api] section
+    // move [global] options to the [web] section
+    config_move(CONFIG_SECTION_GLOBAL, "http port listen backlog",
+                CONFIG_SECTION_WEB,    "listen backlog");
+
     config_move(CONFIG_SECTION_GLOBAL, "bind socket to IP",
                 CONFIG_SECTION_WEB,    "bind to");
 
@@ -411,7 +415,7 @@ static void get_netdata_configured_variables() {
 
     char buf[HOSTNAME_MAX + 1];
     if(gethostname(buf, HOSTNAME_MAX) == -1)
-        error("WARNING: Cannot get machine hostname.");
+        error("Cannot get machine hostname.");
 
     netdata_configured_hostname = config_get(CONFIG_SECTION_GLOBAL, "hostname", buf);
     debug(D_OPTIONS, "hostname set to '%s'", netdata_configured_hostname);
@@ -614,6 +618,7 @@ int main(int argc, char **argv) {
                     config_set(CONFIG_SECTION_GLOBAL, "run as user", optarg);
                     break;
                 case 'v':
+                case 'V':
                     printf("%s %s\n", program_name, program_version);
                     return 0;
                 case 'W':