代码拉取完成,页面将自动刷新
From 41bf507ca6cbbdf5e646a405de6b8d5b9be4bd28 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B4=BA=E6=9C=89=E5=BF=97?= <1037617413@qq.com>
Date: Wed, 16 Oct 2024 17:20:01 +0800
Subject: [PATCH] enrich alert info about kernel stack
---
src/python/sentryPlugins/ai_block_io/detector.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/python/sentryPlugins/ai_block_io/detector.py b/src/python/sentryPlugins/ai_block_io/detector.py
index ed8b64a..8536f7a 100644
--- a/src/python/sentryPlugins/ai_block_io/detector.py
+++ b/src/python/sentryPlugins/ai_block_io/detector.py
@@ -103,8 +103,10 @@ class DiskDetector:
elif len(diagnosis_info["rq_driver"]) != 0:
root_cause = "[Root Cause: disk slow]"
elif len(diagnosis_info["io_stage"]) != 0:
- stage = diagnosis_info["io_stage"][0][1].stage_name
- root_cause = f"[Root Cause: io stage slow, stage: {stage}]"
+ stage_list = []
+ for io_stage in diagnosis_info["io_stage"]:
+ stage_list.append(io_stage[0].stage_name)
+ root_cause = f"[Root Cause: io stage slow, stage: {stage_list}]"
if root_cause is None:
root_cause = "[Root Cause: high io pressure]"
return True, diagnosis_info["bio"][0][0], diagnosis_info["bio"][0][1], root_cause
--
2.23.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。