X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=src%2Fdaemon.c;h=42b04c40190b76bd502a73bd5fced3746320aaf7;hb=f74a2240c8b8e7a469170d6300bfd4fb79ef52c1;hp=835c014a7a5b8f074021f7c18dad0f89ee9365c3;hpb=5b9054a89f2be6b0d47eaba8fc7cd5e923a9d35a;p=netdata.git diff --git a/src/daemon.c b/src/daemon.c index 835c014a..42b04c40 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -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)) {