From f54b41aed613e37098767b0c4a40197476e6e4fb Mon Sep 17 00:00:00 2001 From: zhuofeng Date: Sat, 12 Oct 2024 15:38:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=BF=97=E7=9A=84?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=89=93=E5=8D=B0=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=A3=81=E7=9B=98=E5=AD=97=E6=AE=B5=E6=9C=AA=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=9A=84=E5=BC=82=E5=B8=B8=E5=A0=86=E6=A0=88=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sysSentry-1.0.2/src/python/sentryCollector/collect_config.py | 4 ++-- sysSentry-1.0.2/src/python/sentryCollector/collect_io.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysSentry-1.0.2/src/python/sentryCollector/collect_config.py b/sysSentry-1.0.2/src/python/sentryCollector/collect_config.py index 5aa38ec..7ca9898 100644 --- a/sysSentry-1.0.2/src/python/sentryCollector/collect_config.py +++ b/sysSentry-1.0.2/src/python/sentryCollector/collect_config.py @@ -127,9 +127,9 @@ class CollectConfig: CONF_IO, CONF_IO_MAX_SAVE, CONF_IO_MAX_SAVE_DEFAULT) result_io_config[CONF_IO_MAX_SAVE] = CONF_IO_MAX_SAVE_DEFAULT # disk - disk = io_map_value.get(CONF_IO_DISK).lower() + disk = io_map_value.get(CONF_IO_DISK) if disk: - disk_str = disk.replace(" ", "") + disk_str = disk.lower().replace(" ", "") pattern = r'^[a-zA-Z0-9-_,]+$' if not re.match(pattern, disk_str): logging.warning("module_name = %s section, field = %s is incorrect, use default %s", diff --git a/sysSentry-1.0.2/src/python/sentryCollector/collect_io.py b/sysSentry-1.0.2/src/python/sentryCollector/collect_io.py index 11c9d9a..f699c3c 100644 --- a/sysSentry-1.0.2/src/python/sentryCollector/collect_io.py +++ b/sysSentry-1.0.2/src/python/sentryCollector/collect_io.py @@ -156,7 +156,7 @@ class CollectIo(): for line in file: count += line.count('.op=' + Io_Category[category].upper()) if count > 0: - logging.info(f"io_dump info : {disk_name}, {stage}, {category}, {count}") + logging.info(f"io_dump info : {disk_name}, {stage}, {Io_Category[category]}, {count}") except FileNotFoundError: logging.error("The file %s does not exist.", io_dump_file) return count @@ -318,7 +318,7 @@ class CollectIo(): curr_io_length = self.get_ebpf_io_length(curr_latency=curr_latency, prev_latency=prev_latency) curr_io_dump = self.get_ebpf_io_dump(curr_io_dump_count=curr_io_dump_count, prev_io_dump_count=prev_io_dump_count) if curr_io_dump > 0: - logging.info(f"ebpf io_dump info : {disk_name}, {stage}, {category}, {curr_io_dump}") + logging.info(f"ebpf io_dump info : {disk_name}, {stage}, {io_type}, {curr_io_dump}") IO_GLOBAL_DATA[disk_name][stage][io_type].insert(0, [curr_lat, curr_io_dump, curr_io_length, curr_iops]) logging.debug(f"ebpf collect data : {IO_GLOBAL_DATA}") elapsed_time = time.time() - start_time -- Gitee