From edbe32637a939d0788bcbde9211a61cfded436bf Mon Sep 17 00:00:00 2001 From: luckky Date: Tue, 5 Nov 2024 17:22:27 +0800 Subject: [PATCH] make debug msg clear 1. Change the page_isolation_threshold default value for 128(kb) to 3355443(kb) to synchronize the modification of the .mod file. 2. Add specific command info in debug message to make debug message clear. 3. Update the commit of the log level and format of syssentry. 4. Change the interval 180 to 10 to short the restart time. --- config/tasks/hbm_online_repair.mod | 2 +- .../src/c/hbm_online_repair/hbm_online_repair.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/tasks/hbm_online_repair.mod b/config/tasks/hbm_online_repair.mod index 77dd73e..4dcef43 100644 --- a/config/tasks/hbm_online_repair.mod +++ b/config/tasks/hbm_online_repair.mod @@ -3,7 +3,7 @@ enabled=yes task_start=/usr/bin/hbm_online_repair task_stop=kill $pid type=period -interval=180 +interval=10 onstart=yes env_file=/etc/sysconfig/hbm_online_repair.env conflict=up \ No newline at end of file diff --git a/src/c/hbm_online_repair/hbm_online_repair.c b/src/c/hbm_online_repair/hbm_online_repair.c index b3b2742..943f201 100644 --- a/src/c/hbm_online_repair/hbm_online_repair.c +++ b/src/c/hbm_online_repair/hbm_online_repair.c @@ -9,7 +9,7 @@ #include "non-standard-hbm-repair.h" #define DEFAULT_LOG_LEVEL LOG_INFO -#define DEFAULT_PAGE_ISOLATION_THRESHOLD 128 +#define DEFAULT_PAGE_ISOLATION_THRESHOLD 3355443 int global_level_setting; int page_isolation_threshold; @@ -44,7 +44,7 @@ int execute_command(const char *command) } fgets(buffer, sizeof(buffer), fp); - log(LOG_DEBUG, "output of command is: %s\n", buffer); + log(LOG_DEBUG, "output of command %s is: %s\n", command, buffer); ret = pclose(fp); if (ret < 0) { @@ -53,12 +53,12 @@ int execute_command(const char *command) } if (!WIFEXITED(ret)) { - log(LOG_ERROR, "command did not terminate normally\n"); + log(LOG_ERROR, "command %s did not terminate normally\n", command); return -1; } ret = WEXITSTATUS(ret); - log(LOG_DEBUG, "command exited with status: %d\n", ret); + log(LOG_DEBUG, "command %s exited with status: %d\n", command, ret); return ret; } -- 2.43.0