提交 f615c85d 编写于 作者: Z Zhangxiaoyu

stats info add cache/total cache field

Signed-off-by: NZhangxiaoyu <zhangxiaoyu58@huawei.com>
上级 7c70e459
......@@ -43,6 +43,15 @@
},
"kmem_limit": {
"type": "uint64"
},
"status": {
"type": "string"
},
"cache": {
"type": "uint64"
},
"cache_total": {
"type": "uint64"
}
}
}
......@@ -96,6 +96,9 @@ struct lcr_container_state {
/* Kernel Memory usage */
uint64_t kmem_used;
uint64_t kmem_limit;
/* Cache usage */
uint64_t cache;
uint64_t cache_total;
};
typedef enum {
......
......@@ -546,6 +546,9 @@ void do_lcr_state(struct lxc_container *c, struct lcr_container_state *lcs)
lcs->mem_limit = stat_get_ull(c, "memory.limit_in_bytes");
lcs->kmem_used = stat_get_ull(c, "memory.kmem.usage_in_bytes");
lcs->kmem_limit = stat_get_ull(c, "memory.kmem.limit_in_bytes");
lcs->cache = stat_match_get_ull(c, "memory.stat", "cache", 1);
lcs->cache_total = stat_match_get_ull(c, "memory.stat", "total_cache", 1);
}
#define ExitSignalOffset 128
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册