luci-base: add luci/getProcessList RPC method
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
8a84b63dc9
commit
8d512f13ec
1 changed files with 11 additions and 0 deletions
|
@ -582,6 +582,17 @@ local methods = {
|
||||||
local sys = require "luci.sys"
|
local sys = require "luci.sys"
|
||||||
return { result = sys.net.conntrack() }
|
return { result = sys.net.conntrack() }
|
||||||
end
|
end
|
||||||
|
},
|
||||||
|
|
||||||
|
getProcessList = {
|
||||||
|
call = function()
|
||||||
|
local sys = require "luci.sys"
|
||||||
|
local res = {}
|
||||||
|
for _, v in pairs(sys.process.list()) do
|
||||||
|
res[#res + 1] = v
|
||||||
|
end
|
||||||
|
return { result = res }
|
||||||
|
end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue