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


##########
be/src/http/default_path_handlers.cpp:
##########
@@ -97,16 +98,74 @@ void config_handler(const WebPageHandler::ArgumentMap& 
args, std::stringstream*
     (*output) << "</pre>";
 }
 
-// Registered to handle "/memz", and prints out memory allocation statistics.
+// Registered to handle "/memory", and prints out memory allocation statistics.
 void mem_usage_handler(const WebPageHandler::ArgumentMap& args, 
std::stringstream* output) {
+    (*output) << "<h2>Memory Documents</h2>\n";
     (*output) << "<pre>"
-              << "Mem Limit: " << PrettyPrinter::print(MemInfo::mem_limit(), 
TUnit::BYTES)
+              << "<a "
+                 
"href=https://doris.apache.org/zh-CN/docs/dev/admin-manual/memory-management/";
+                 "overview>Memory Management Overview</a>"
+              << std::endl
+              << "<a "
+                 
"href=https://doris.apache.org/zh-CN/docs/dev/admin-manual/memory-management/";
+                 "memory-issue-faq>Memory Issue FAQ</a>"
               << std::endl
-              << "Physical Mem From Perf: "
-              << PrettyPrinter::print(PerfCounters::get_vm_rss(), 
TUnit::BYTES) << std::endl
               << "</pre>";
 
-    (*output) << "<pre>";
+    (*output) << "<h2 id=\"memoryPropertiesTitle\">Memory Properties</h2>\n";
+    (*output) << "<pre id=\"memoryProperties\">"
+              << "System Physical Mem: "
+              << PrettyPrinter::print(MemInfo::physical_mem(), TUnit::BYTES) 
<< std::endl
+              << "System Page Size: " << MemInfo::get_page_size() << std::endl
+              << "Mem Limit: " << MemInfo::mem_limit_str() << std::endl
+              << "Soft Mem Limit: " << MemInfo::soft_mem_limit_str() << 
std::endl
+              << "System Mem Available Low Water Mark: "
+              << 
PrettyPrinter::print(MemInfo::sys_mem_available_low_water_mark(), TUnit::BYTES)
+              << std::endl
+              << "System Mem Available Warning Water Mark: "
+              << 
PrettyPrinter::print(MemInfo::sys_mem_available_warning_water_mark(), 
TUnit::BYTES)
+              << std::endl
+              << "Cgroup Mem Limit: "
+              << PrettyPrinter::print(MemInfo::cgroup_mem_limit(), 
TUnit::BYTES) << std::endl
+              << "Cgroup Mem Usage: "
+              << PrettyPrinter::print(MemInfo::cgroup_mem_usage(), 
TUnit::BYTES) << std::endl
+              << "Cgroup Mem Refresh State: " << 
MemInfo::cgroup_mem_refresh_state() << std::endl
+              << "</pre>";
+
+    (*output) << "<h2 id=\"memoryOverviewTitle\">Memory Overview</h2>\n";
+    MemoryProfile::refresh_memory_overview_profile();

Review Comment:
   done



-- 
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