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