update log when it is not lock collect
This commit is contained in:
parent
3b27aac2a2
commit
e032d94603
@ -4,7 +4,7 @@
|
|||||||
Summary: System Inspection Framework
|
Summary: System Inspection Framework
|
||||||
Name: sysSentry
|
Name: sysSentry
|
||||||
Version: 1.0.2
|
Version: 1.0.2
|
||||||
Release: 24
|
Release: 25
|
||||||
License: Mulan PSL v2
|
License: Mulan PSL v2
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||||
@ -37,6 +37,7 @@ Patch24: fix-python-3.7-not-support-list-bool-type.patch
|
|||||||
Patch25: avg_block_io-send-alarm-to-xalarmd.patch
|
Patch25: avg_block_io-send-alarm-to-xalarmd.patch
|
||||||
Patch26: bugfix-typo.patch
|
Patch26: bugfix-typo.patch
|
||||||
Patch27: fix-config-relative-some-issues.patch
|
Patch27: fix-config-relative-some-issues.patch
|
||||||
|
Patch28: update-log-when-it-is-not-lock-collect.patch
|
||||||
|
|
||||||
BuildRequires: cmake gcc-c++
|
BuildRequires: cmake gcc-c++
|
||||||
BuildRequires: python3 python3-setuptools
|
BuildRequires: python3 python3-setuptools
|
||||||
@ -279,6 +280,12 @@ rm -rf %{buildroot}
|
|||||||
%attr(0550,root,root) %{python3_sitelib}/sentryPlugins/ai_block_io
|
%attr(0550,root,root) %{python3_sitelib}/sentryPlugins/ai_block_io
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 9 2024 zhuofeng <zhuofeng2@huawei.com> - 1.0.2-25
|
||||||
|
- Type:bugfix
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:update log when it is not lock collect
|
||||||
|
|
||||||
* Wed Oct 9 2024 heyouzhi <heyouzhi@huawei.com> - 1.0.2-24
|
* Wed Oct 9 2024 heyouzhi <heyouzhi@huawei.com> - 1.0.2-24
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
35
update-log-when-it-is-not-lock-collect.patch
Normal file
35
update-log-when-it-is-not-lock-collect.patch
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
From ac73565fdb0e4bc544e5308ea0251dd6be410ed9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhuofeng <zhuofeng2@huawei.com>
|
||||||
|
Date: Wed, 9 Oct 2024 16:37:24 +0800
|
||||||
|
Subject: [PATCH] update log when it is not lock collect
|
||||||
|
|
||||||
|
---
|
||||||
|
src/python/sentryCollector/collect_io.py | 8 ++++++--
|
||||||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/python/sentryCollector/collect_io.py b/src/python/sentryCollector/collect_io.py
|
||||||
|
index e45947a..2e75187 100644
|
||||||
|
--- a/src/python/sentryCollector/collect_io.py
|
||||||
|
+++ b/src/python/sentryCollector/collect_io.py
|
||||||
|
@@ -179,13 +179,17 @@ class CollectIo():
|
||||||
|
blk_io_hierarchy_path = os.path.join(disk_path, 'blk_io_hierarchy')
|
||||||
|
|
||||||
|
if not os.path.exists(blk_io_hierarchy_path):
|
||||||
|
- logging.error("no blk_io_hierarchy directory found in %s, skipping.", disk_name)
|
||||||
|
+ logging.warning("no blk_io_hierarchy directory found in %s, skipping.", disk_name)
|
||||||
|
continue
|
||||||
|
|
||||||
|
for file_name in os.listdir(blk_io_hierarchy_path):
|
||||||
|
file_path = os.path.join(blk_io_hierarchy_path, file_name)
|
||||||
|
if file_name == 'stats':
|
||||||
|
all_disk.append(disk_name)
|
||||||
|
+
|
||||||
|
+ if len(all_disk) == 0:
|
||||||
|
+ logging.debug("no blk_io_hierarchy disk, it is not lock-free collection")
|
||||||
|
+ return False
|
||||||
|
|
||||||
|
if self.loop_all:
|
||||||
|
self.disk_list = all_disk
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user