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