1 Star 0 Fork 7

卫亚平/A-Tune-Collector

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
memory-bandwidth-dimm-slot-atuned.patch 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
gaoruoshu 提交于 2023-08-01 09:43 +08:00 . feature: enable application configs
From 7c21a2da2c931089e4ec2b86ae35a510f2f7793d Mon Sep 17 00:00:00 2001
From: SWWBF <1152719547@qq.com>
Date: Mon, 10 Jul 2023 05:52:54 +0800
Subject: [PATCH 06/11] some kvm has no slot which may cause panic of
atune
---
atune_collector/plugin/monitor/memory/bandwidth.py | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/atune_collector/plugin/monitor/memory/bandwidth.py b/atune_collector/plugin/monitor/memory/bandwidth.py
index f44925f..6d59ab6 100755
--- a/atune_collector/plugin/monitor/memory/bandwidth.py
+++ b/atune_collector/plugin/monitor/memory/bandwidth.py
@@ -158,12 +158,13 @@ class MemBandwidth(Monitor):
for dimm in info["memorys"][0]["children"]:
if dimm.get("size") is None:
continue
- locator = memtopo.table_get_locator(dimm["slot"])
- if locator is None:
- continue
- if dimms[locator[0]][locator[1]] == 0:
- dimms[locator[0]][locator[1]] = dimm["width"] * \
- memtopo.table_get_freq(dimm["description"]) / 8
+ if "slot" in dimm:
+ locator = memtopo.table_get_locator(dimm["slot"])
+ if locator is None:
+ continue
+ if dimms[locator[0]][locator[1]] == 0:
+ dimms[locator[0]][locator[1]] = dimm["width"] * \
+ memtopo.table_get_freq(dimm["description"]) / 8
ret = 0
for channel in dimms[socket]:
ret += channel
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/weiyp2016/A-Tune-Collector.git
git@gitee.com:weiyp2016/A-Tune-Collector.git
weiyp2016
A-Tune-Collector
A-Tune-Collector
master

搜索帮助