From a49896c1c13cc16b5781a98e634cf9ceea0845e3 Mon Sep 17 00:00:00 2001 From: zhuofeng Date: Sat, 12 Oct 2024 14:34:35 +0800 Subject: [PATCH] fix io_dump for collect module --- fix-io_dump-for-collect-module.patch | 25 +++++++++++++++++++++++++ sysSentry.spec | 9 ++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 fix-io_dump-for-collect-module.patch diff --git a/fix-io_dump-for-collect-module.patch b/fix-io_dump-for-collect-module.patch new file mode 100644 index 0000000..452ba0a --- /dev/null +++ b/fix-io_dump-for-collect-module.patch @@ -0,0 +1,25 @@ +From 6307a1ff4068a541658e3312ca938c6fdd9a5c1a Mon Sep 17 00:00:00 2001 +From: zhuofeng +Date: Sat, 12 Oct 2024 14:51:51 +0800 +Subject: [PATCH] fix io_dump for collect module + +--- + src/python/sentryCollector/collect_io.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/python/sentryCollector/collect_io.py b/src/python/sentryCollector/collect_io.py +index d734734..11c9d9a 100644 +--- a/src/python/sentryCollector/collect_io.py ++++ b/src/python/sentryCollector/collect_io.py +@@ -154,7 +154,7 @@ class CollectIo(): + try: + with open(io_dump_file, 'r') as file: + for line in file: +- count += line.count('.op=' + Io_Category[category]) ++ count += line.count('.op=' + Io_Category[category].upper()) + if count > 0: + logging.info(f"io_dump info : {disk_name}, {stage}, {category}, {count}") + except FileNotFoundError: +-- +2.33.0 + diff --git a/sysSentry.spec b/sysSentry.spec index a9261e3..969b5ce 100644 --- a/sysSentry.spec +++ b/sysSentry.spec @@ -4,7 +4,7 @@ Summary: System Inspection Framework Name: sysSentry Version: 1.0.2 -Release: 37 +Release: 38 License: Mulan PSL v2 Group: System Environment/Daemons Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz @@ -52,6 +52,7 @@ Patch39: add-log-for-xalarm-when-sending-msg-and-clean-invali.patch Patch40: add-xalarm-cleanup-invalid-server-socket-peroidly.patch Patch41: ai_block_io-support-stage-and-iotype.patch Patch42: ebpf-fix-collect-iodump.patch +Patch43: fix-io_dump-for-collect-module.patch BuildRequires: cmake gcc-c++ BuildRequires: python3 python3-setuptools @@ -306,6 +307,12 @@ rm -rf %{buildroot} %attr(0550,root,root) %{python3_sitelib}/sentryPlugins/ai_block_io %changelog +* Sat Oct 12 2024 zhuofeng - 1.0.2-38 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix io_dump for collect module + * Sat Oct 12 2024 zhangnan - 1.0.2-37 - Type:bugfix - CVE:NA -- Gitee