X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=src%2Fdaemon.c;h=42b04c40190b76bd502a73bd5fced3746320aaf7;hb=0b3b92cdf87f4b8ddeae69a651c24891112171aa;hp=e7f3b037fd73bd808ea5d999bb00bd1b60b107ff;hpb=577dbe94496479256311a8c84909c36123b7a406;p=netdata.git diff --git a/src/daemon.c b/src/daemon.c index e7f3b037..42b04c40 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -27,7 +27,7 @@ void sig_handler_save(int signo) if(signo) { error_log_limit_unlimited(); info("Received signal %d to save the database...", signo); - rrdset_save_all(); + rrdhost_save_all(); error_log_limit_reset(); } } @@ -156,7 +156,7 @@ int become_user(const char *username, int pid_fd) } static void oom_score_adj(void) { - int score = (int)config_get_number("global", "OOM score", 1000); + int score = (int)config_get_number(CONFIG_SECTION_GLOBAL, "OOM score", 1000); int done = 0; int fd = open("/proc/self/oom_score_adj", O_WRONLY); @@ -175,7 +175,7 @@ static void oom_score_adj(void) { static void process_nice_level(void) { #ifdef HAVE_NICE - int nice_level = (int)config_get_number("global", "process nice level", 19); + int nice_level = (int)config_get_number(CONFIG_SECTION_GLOBAL, "process nice level", 19); if(nice(nice_level) == -1) error("Cannot set netdata CPU nice level to %d.", nice_level); else debug(D_SYSTEM, "Set netdata nice level to %d.", nice_level); #endif // HAVE_NICE @@ -239,7 +239,7 @@ static void sched_setscheduler_set(void) { int found = 0; // read the configuration - name = config_get("global", "process scheduling policy", name); + name = config_get(CONFIG_SECTION_GLOBAL, "process scheduling policy", name); int i; for(i = 0 ; scheduler_defaults[i].name ; i++) { if(!strcmp(name, scheduler_defaults[i].name)) { @@ -251,7 +251,7 @@ static void sched_setscheduler_set(void) { return; if(flags & SCHED_FLAG_PRIORITY_CONFIGURABLE) - priority = (int)config_get_number("global", "process scheduling priority", priority); + priority = (int)config_get_number(CONFIG_SECTION_GLOBAL, "process scheduling priority", priority); #ifdef HAVE_SCHED_GET_PRIORITY_MIN if(priority < sched_get_priority_min(policy)) {