excessive CPU usage
Signed-off-by: jinsaihang <jinsaihang@h-partners.com>
This commit is contained in:
parent
96c4505441
commit
d84ff78577
41
fix-excessive-CPU-usage.patch
Normal file
41
fix-excessive-CPU-usage.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From 815537382fc0d5164fe57b0d984ca4a1ed8254ea Mon Sep 17 00:00:00 2001
|
||||
From: jinsaihang <jinsaihang@h-partners.com>
|
||||
Date: Thu, 31 Oct 2024 16:00:50 +0800
|
||||
Subject: [PATCH] excessive CPU usage
|
||||
|
||||
Signed-off-by: jinsaihang <jinsaihang@h-partners.com>
|
||||
---
|
||||
sysSentry-1.0.2/src/python/xalarm/xalarm_transfer.py | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/src/python/xalarm/xalarm_transfer.py b/src/python/xalarm/xalarm_transfer.py
|
||||
index b072007..4bebe5d 100644
|
||||
--- a/src/python/xalarm/xalarm_transfer.py
|
||||
+++ b/src/python/xalarm/xalarm_transfer.py
|
||||
@@ -62,7 +62,6 @@ def cleanup_closed_connections(server_sock, epoll, fd_to_socket):
|
||||
to_remove.append(fileno)
|
||||
|
||||
for fileno in to_remove:
|
||||
- epoll.unregister(fileno)
|
||||
fd_to_socket[fileno].close()
|
||||
del fd_to_socket[fileno]
|
||||
logging.info(f"cleaned up connection {fileno} for client lost connection.")
|
||||
@@ -97,7 +96,6 @@ def wait_for_connection(server_sock, epoll, fd_to_socket, thread_should_stop):
|
||||
logging.info(f"connection reach max num of {MAX_CONNECTION_NUM}, closed current connection!")
|
||||
connection.close()
|
||||
continue
|
||||
- epoll.register(connection.fileno(), select.EPOLLOUT)
|
||||
fd_to_socket[connection.fileno()] = connection
|
||||
except socket.error as e:
|
||||
logging.debug(f"socket error, reason is {e}")
|
||||
@@ -122,7 +120,6 @@ def transmit_alarm(server_sock, epoll, fd_to_socket, bin_data):
|
||||
except (BrokenPipeError, ConnectionResetError):
|
||||
to_remove.append(fileno)
|
||||
for fileno in to_remove:
|
||||
- epoll.unregister(fileno)
|
||||
fd_to_socket[fileno].close()
|
||||
del fd_to_socket[fileno]
|
||||
logging.info(f"cleaned up connection {fileno} for client lost connection.")
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
Summary: System Inspection Framework
|
||||
Name: sysSentry
|
||||
Version: 1.0.2
|
||||
Release: 55
|
||||
Release: 56
|
||||
License: Mulan PSL v2
|
||||
Group: System Environment/Daemons
|
||||
Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||
@ -75,6 +75,7 @@ Patch62: add-hbm-online-repair.patch
|
||||
Patch63: fix-hbm-online-repair-notice-and-efi-create.patch
|
||||
Patch64: get_alarm-d-abnomal-display.patch
|
||||
Patch65: modify-logrotate-rule.patch
|
||||
Patch66: fix-excessive-CPU-usage.patch
|
||||
|
||||
BuildRequires: cmake gcc-c++
|
||||
BuildRequires: python3 python3-setuptools
|
||||
@ -368,6 +369,12 @@ rm -rf %{buildroot}
|
||||
%attr(0550,root,root) %{python3_sitelib}/syssentry/bmc_alarm.py
|
||||
|
||||
%changelog
|
||||
* Fri Nov 1 2024 jinsaihang <jinsaihang@h-partners.com> - 1.0.2-56
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DES:excessive CPU usage
|
||||
|
||||
* Thu Oct 31 2024 zhangnan <zhangnan134@huawei.com> - 1.0.2-55
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user