}
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);
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
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)) {
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)) {