When I run a process list on luCi, it gives me most, but not all, of the currently running processes.
In particular, snort (PID 6896) doesn't show on the list. Is the process list filtered?
Running OpenWrt SNAPSHOT r12935+261-a185cc1be1 / LuCI Master git-20.111.65731-398b198
Possibly that is due to a parsing error.
On that line you have a letter in a numeric field: "564m"
I guess that LuCI fails to parse that line and skips it.
Looks like this code expects VSZ field to be numeric "+(%d+)
":
local data = {}
local k
local ps = luci.util.execi("/bin/busybox top -bn1")
if not ps then
return
end
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+%%) +(.+)"
)
local idx = tonumber(pid)
if idx and not cmd:match("top %-bn1") then
data[idx] = {
['PID'] = pid,
['PPID'] = ppid,
['USER'] = user,
['STAT'] = stat,
['VSZ'] = vsz,
@jow might be able to provide more qualified reasoning.
jow
May 4, 2020, 2:59pm
3
Yeah, sounds right. I've never seen/expected a process with such a huge VSS on OpenWrt yet.
I run a heavy snort ruleset, so it's memory intensive.
system
Closed
May 14, 2020, 4:41pm
5
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.