]> arthur.barton.de Git - netdata.git/blobdiff - src/daemon.c
less INFO messages - they are now DEBUG; fixes #459
[netdata.git] / src / daemon.c
index 8653e3b9450d7ce3e23098bd79072d863b5a87f2..5bf6a1e0a0fffddcb69c669fce54ea9761c041c7 100644 (file)
@@ -15,18 +15,30 @@ void sig_handler_exit(int signo)
 void sig_handler_logrotate(int signo)
 {
     if(signo) {
-        error_log_limit_reset();
+        error_log_limit_unlimited();
         info("Received signal %d to re-open the log files", signo);
         reopen_all_log_files();
+        error_log_limit_reset();
     }
 }
 
 void sig_handler_save(int signo)
 {
     if(signo) {
-        error_log_limit_reset();
+        error_log_limit_unlimited();
         info("Received signal %d to save the database...", signo);
         rrdset_save_all();
+        error_log_limit_reset();
+    }
+}
+
+void sig_handler_reload_health(int signo)
+{
+    if(signo) {
+        error_log_limit_unlimited();
+        info("Received signal %d to reload health configuration...", signo);
+        health_reload();
+        error_log_limit_reset();
     }
 }
 
@@ -126,10 +138,11 @@ void oom_score_adj(int score) {
     if(!done)
         error("Cannot adjust my Out-Of-Memory score to %d.", score);
     else
-        info("Adjusted my Out-Of-Memory score to %d.", score);
+        debug(D_SYSTEM, "Adjusted my Out-Of-Memory score to %d.", score);
 }
 
 int sched_setscheduler_idle(void) {
+#ifdef SCHED_IDLE
     const struct sched_param param = {
         .sched_priority = 0
     };
@@ -138,9 +151,12 @@ int sched_setscheduler_idle(void) {
     if(i != 0)
         error("Cannot adjust my scheduling priority to IDLE.");
     else
-        info("Adjusted my scheduling priority to IDLE.");
+        debug(D_SYSTEM, "Adjusted my scheduling priority to IDLE.");
 
     return i;
+#else
+    return -1;
+#endif
 }
 
 int become_daemon(int dont_fork, const char *user)
@@ -198,14 +214,14 @@ int become_daemon(int dont_fork, const char *user)
     // never become a problem
     if(sched_setscheduler_idle() != 0) {
         if(nice(19) == -1) error("Cannot lower my CPU priority.");
-        else info("Set my nice value to 19.");
+        else debug(D_SYSTEM, "Set my nice value to 19.");
     }
 
     if(user && *user) {
         if(become_user(user, pidfd) != 0) {
             error("Cannot become user '%s'. Continuing as we are.", user);
         }
-        else info("Successfully became user '%s'.", user);
+        else debug(D_SYSTEM, "Successfully became user '%s'.", user);
     }
 
     if(pidfd != -1) {