!165 make debug msg clear

From: @luckky7 
Reviewed-by: @lvying6 
Signed-off-by: @lvying6
This commit is contained in:
openeuler-ci-bot 2024-11-06 03:07:23 +00:00 committed by Gitee
commit 32f56fb8d8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 77 additions and 1 deletions

View File

@ -0,0 +1,69 @@
From edbe32637a939d0788bcbde9211a61cfded436bf Mon Sep 17 00:00:00 2001
From: luckky <guodashun1@huawei.com>
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

View File

@ -4,7 +4,7 @@
Summary: System Inspection Framework
Name: sysSentry
Version: 1.0.2
Release: 60
Release: 61
License: Mulan PSL v2
Group: System Environment/Daemons
Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz
@ -82,6 +82,7 @@ Patch69: change-avg_block_io-config.patch
Patch70: ai_block_io-support-absolute-threshold-lower-limit.patch
Patch71: ai_block_io-fix-some-config-parameters-parse-bug.patch
Patch72: update-nvme-config.patch
Patch73: make-debug-msg-clear.patch
BuildRequires: cmake gcc-c++
BuildRequires: python3 python3-setuptools
@ -375,6 +376,12 @@ rm -rf %{buildroot}
%attr(0550,root,root) %{python3_sitelib}/syssentry/bmc_alarm.py
%changelog
* Tue Nov 5 2024 luckky <guodashun1@huawei.com> - 1.0.2-61
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:make debug msg clear
* Tue Nov 5 2024 zhangnan <zhangnan134@huawei.com> - 1.0.2-60
- Type:bugfix
- CVE:NA