From 9032181967ea9c5c985e346c51bca6b9997d7287 Mon Sep 17 00:00:00 2001 From: Hideo Yamauchi Date: Mon, 27 May 2024 18:12:01 +0900 Subject: [PATCH] Mid: storage-mon: Add logging to daemon mode. --- tools/storage_mon.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/storage_mon.c b/tools/storage_mon.c index a9227ef9..f94268f6 100644 --- a/tools/storage_mon.c +++ b/tools/storage_mon.c @@ -308,6 +308,8 @@ static int32_t sigchld_handler(int32_t sig, void *data) /* so add the final_score from the exit code of the terminated child process. */ if (qb_loop_timer_is_running(storage_mon_poll_handle, expire_handle)) { if (WEXITSTATUS(status) !=0) { + syslog(LOG_ERR, "Error reading from device %s", devices[index]); + final_score += scores[index]; /* Update response values immediately in preparation for inquiries from clients. */ @@ -403,6 +405,8 @@ static void child_timeout_handler(void *data) if (is_child_runnning()) { for (i=0; i 0) { + syslog(LOG_ERR, "Reading from device %s did not complete in %d seconds timeout", devices[i], timeout); + /* If timeout occurs before SIGCHLD, add child process failure score to final_score. */ final_score += scores[i]; -- 2.25.1