From c01ba627f6862291bbe354afde099e059543b7fa Mon Sep 17 00:00:00 2001 From: Hiroki OTA Date: Tue, 29 Aug 2023 14:13:29 +0900 Subject: [PATCH] fix(system_monitor): high-memory process are not provided in MEM order (backport #4654) (#769) fix(system_monitor): high-memory process are not provided in MEM order (#4654) * fix(process_monitor): high-memory process are not being provided in %MEM order * changed option from 'g' to 'n' --------- Signed-off-by: ito-san Co-authored-by: ito-san <57388357+ito-san@users.noreply.github.com> --- system/system_monitor/src/process_monitor/process_monitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/system_monitor/src/process_monitor/process_monitor.cpp b/system/system_monitor/src/process_monitor/process_monitor.cpp index 2ce1738ecd960..f8ee314e5a0ef 100644 --- a/system/system_monitor/src/process_monitor/process_monitor.cpp +++ b/system/system_monitor/src/process_monitor/process_monitor.cpp @@ -401,7 +401,7 @@ void ProcessMonitor::getHighMemoryProcesses(const std::string & output) bp::pipe err_pipe{err_fd[0], err_fd[1]}; bp::ipstream is_err{std::move(err_pipe)}; - bp::child c("sort -r -k 10", bp::std_out > p2, bp::std_err > is_err, bp::std_in < p1); + bp::child c("sort -r -k 10 -n", bp::std_out > p2, bp::std_err > is_err, bp::std_in < p1); c.wait(); if (c.exit_code() != 0) { is_err >> os.rdbuf();