xinyiZzz commented on code in PR #39256:
URL: https://github.com/apache/doris/pull/39256#discussion_r1714616493


##########
be/src/util/mem_info.cpp:
##########
@@ -194,65 +194,28 @@ void MemInfo::refresh_proc_meminfo() {
         int64_t cgroup_mem_usage = -1;
         std::string cgroup_mem_info_file_path;
         _s_cgroup_mem_refresh_state = true;
-        Status status = CGroupUtil::find_cgroup_mem_limit(&cgroup_mem_limit);
+        Status status = 
CGroupMemoryCtl::find_cgroup_mem_limit(&cgroup_mem_limit);
         if (!status.ok() || cgroup_mem_limit <= 0) {
             _s_cgroup_mem_refresh_state = false;
         }
-        status = CGroupUtil::find_cgroup_mem_usage(&cgroup_mem_usage);
+        status = CGroupMemoryCtl::find_cgroup_mem_usage(&cgroup_mem_usage);
         if (!status.ok() || cgroup_mem_usage <= 0) {
             _s_cgroup_mem_refresh_state = false;
         }
-        status = CGroupUtil::find_cgroup_mem_info(&cgroup_mem_info_file_path);

Review Comment:
   我已经抽出来了两个方法,cgroup目前已知有两种文件格式,
   1. 文件中就一行数字
   2. 文件中多行,每行是  xxx: xxx
   我给方法加上注释
   
![image](https://github.com/user-attachments/assets/821656d7-03fc-4e83-872d-ff767b6b414c)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to