!88 fix io_dump for collect module

From: @zhuofeng6 
Reviewed-by: @gaoruoshu 
Signed-off-by: @gaoruoshu
This commit is contained in:
openeuler-ci-bot 2024-10-12 06:51:56 +00:00 committed by Gitee
commit 18ac53736a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,25 @@
From 6307a1ff4068a541658e3312ca938c6fdd9a5c1a Mon Sep 17 00:00:00 2001
From: zhuofeng <zhuofeng2@huawei.com>
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

View File

@ -4,7 +4,7 @@
Summary: System Inspection Framework
Name: sysSentry
Version: 1.0.2
Release: 34
Release: 35
License: Mulan PSL v2
Group: System Environment/Daemons
Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz
@ -51,6 +51,7 @@ Patch38: fix-xalarm_upgrade-not-return-val-and-fail-when-thre.patch
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: fix-io_dump-for-collect-module.patch
BuildRequires: cmake gcc-c++
BuildRequires: python3 python3-setuptools
@ -295,6 +296,12 @@ rm -rf %{buildroot}
%attr(0550,root,root) %{python3_sitelib}/sentryPlugins/ai_block_io
%changelog
* Sat Oct 12 2024 zhuofeng <zhangnan134@huawei.com> - 1.0.2-35
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:fix io_dump for collect module
* Fri Oct 11 2024 heyouzhi <heyouzhi@huawei.com> - 1.0.2-34
- Type:requirement
- CVE:NA