Commit 4f2ecd88 authored by Hannu Nyman's avatar Hannu Nyman
Browse files

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: default avatarHannu Nyman <hannu.nyman@iki.fi>
parent 509bf29c
......@@ -379,7 +379,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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment