From 0d48366169ab041a0373c1dc49626ad7bb980b5c Mon Sep 17 00:00:00 2001 From: lixiang Date: Fri, 20 Sep 2024 03:20:52 +0000 Subject: [PATCH] Fixed description issues in some codes Signed-off-by: lixiang --- .../src/python/sentryCollector/collect_plugin.py | 6 +++--- .../src/python/sentryPlugins/avg_block_io/utils.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysSentry-1.0.2/src/python/sentryCollector/collect_plugin.py b/sysSentry-1.0.2/src/python/sentryCollector/collect_plugin.py index 9132473..1faa5e3 100644 --- a/sysSentry-1.0.2/src/python/sentryCollector/collect_plugin.py +++ b/sysSentry-1.0.2/src/python/sentryCollector/collect_plugin.py @@ -10,7 +10,7 @@ # See the Mulan PSL v2 for more details. """ -collcet plugin +collect plugin """ import json import socket @@ -75,7 +75,7 @@ def client_send_and_recv(request_data, data_str_len, protocol): try: client_socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) except socket.error: - print("collect_plugin: client creat socket error") + print("collect_plugin: client create socket error") return None try: @@ -128,7 +128,7 @@ def client_send_and_recv(request_data, data_str_len, protocol): def validate_parameters(param, len_limit, char_limit): ret = ResultMessage.RESULT_SUCCEED if not param: - print("parm is invalid") + print("param is invalid") ret = ResultMessage.RESULT_NOT_PARAM return [False, ret] diff --git a/sysSentry-1.0.2/src/python/sentryPlugins/avg_block_io/utils.py b/sysSentry-1.0.2/src/python/sentryPlugins/avg_block_io/utils.py index 54ed080..6b9768b 100644 --- a/sysSentry-1.0.2/src/python/sentryPlugins/avg_block_io/utils.py +++ b/sysSentry-1.0.2/src/python/sentryPlugins/avg_block_io/utils.py @@ -65,7 +65,7 @@ def update_io_data(old_avg, period_value, win_size, io_data, io_key): def update_avg_and_check_abnormal(data, io_key, win_size, io_avg_value, io_data): - """update avg and check abonrmal, return true if win_size full""" + """update avg and check abnormal, return true if win_size full""" period_value = get_nested_value(data, io_key) old_avg = get_nested_value(io_avg_value, io_key) -- Gitee