summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannu Nyman <hannu.nyman@iki.fi>2020-09-19 08:46:16 +0300
committerHannu Nyman <hannu.nyman@iki.fi>2020-09-19 08:58:05 +0300
commit8401f59e036dda2b7927dfd7ab2b20f7435861ef (patch)
tree03d179f68acdb9c50d754c7b3145c9abf0ece22a
parentdc51a2f845fa19250ee388f9c95a8db488d9279c (diff)
luci-base: tweak busybox top regex to accept 'm' in large VSZ
Tweak the lua regex string for process list, so that processes with extremely large memory sizes (over 100 MB) are matched. For those large processes busybox top shows a MB value like '234m' instead of a normal kB value like 234000. Fixes #4425 Reference to https://github.com/openwrt/luci/issues/4425#issuecomment-694073479 Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> (cherry picked from commit 4f2ecd88fd02c1279041f45ccd758184b153c875)
-rw-r--r--modules/luci-base/luasrc/sys.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/luci-base/luasrc/sys.lua b/modules/luci-base/luasrc/sys.lua
index 60762ace88..06f70973cc 100644
--- a/modules/luci-base/luasrc/sys.lua
+++ b/modules/luci-base/luasrc/sys.lua
@@ -387,7 +387,7 @@ function process.list()
for line in ps do
local pid, ppid, user, stat, vsz, mem, cpu, cmd = line:match(
- "^ *(%d+) +(%d+) +(%S.-%S) +([RSDZTW][<NW ][<N ]) +(%d+) +(%d+%%) +(%d+%%) +(.+)"
+ "^ *(%d+) +(%d+) +(%S.-%S) +([RSDZTW][<NW ][<N ]) +(%d+m?) +(%d+%%) +(%d+%%) +(.+)"
)
local idx = tonumber(pid)