代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/lxc 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 4daa1572b9f129ba46cefb13683de90b49404872 Mon Sep 17 00:00:00 2001
From: zhangxiaoyu <[email protected]>
Date: Tue, 18 Apr 2023 15:22:21 +0800
Subject: [PATCH] remove unused meminfo stats
Signed-off-by: zhangxiaoyu <[email protected]>
---
src/lxc/lxccontainer.c | 10 ----------
src/lxc/lxccontainer.h | 2 --
2 files changed, 12 deletions(-)
diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index afbeb3c..cc6c5cd 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -6053,16 +6053,6 @@ static bool do_lxcapi_get_container_metrics(struct lxc_container *c, struct lxc
metrics->cpu_use_nanos = metrics_get_ull(c, cgroup_ops, "cpuacct.usage");
metrics->pids_current = metrics_get_ull(c, cgroup_ops, "pids.current");
- uint64_t usage_bytes;
- uint64_t workingset;
- usage_bytes = metrics_match_get_ull(c,cgroup_ops, "memory.stat", "rss", 1) +
- metrics_match_get_ull(c, cgroup_ops, "memory.stat", "cache", 1) +
- metrics_match_get_ull(c, cgroup_ops, "memory.stat", "swap", 1);
- // workingset = usage - inactive_file
- workingset = usage_bytes - metrics_match_get_ull(c, cgroup_ops, "memory.stat", "total_inactive_file", 1);
- // Avaliable bytes = limit - workingset
- metrics->avaliable_bytes = metrics_get_ull(c, cgroup_ops, "memory.limit_in_bytes") - workingset;
- metrics->usage_bytes = usage_bytes;
metrics->rss_bytes = metrics_match_get_ull(c,cgroup_ops, "memory.stat", "rss", 1);
metrics->page_faults = metrics_match_get_ull(c,cgroup_ops, "memory.stat", "pgfault", 1);
metrics->major_page_faults = metrics_match_get_ull(c,cgroup_ops, "memory.stat", "pgmajfault", 1);
diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h
index 68dfec9..96db5e6 100644
--- a/src/lxc/lxccontainer.h
+++ b/src/lxc/lxccontainer.h
@@ -68,8 +68,6 @@ struct lxc_container_metrics {
/* Memory usage */
uint64_t mem_used;
uint64_t mem_limit;
- uint64_t avaliable_bytes;
- uint64_t usage_bytes;
uint64_t rss_bytes;
uint64_t page_faults;
uint64_t major_page_faults;
--
2.25.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。