diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-11-03 18:43:44 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-11-03 20:03:25 +0100 |
commit | 8d512f13ec722d623ece201c89c806dabbe3bd14 (patch) | |
tree | 29a4e90104b2c4d0663d2c2136487fc0749ac453 /modules/luci-base/root | |
parent | 8a84b63dc9cac38ab68f9517c31004095441706e (diff) |
luci-base: add luci/getProcessList RPC method
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/root')
-rwxr-xr-x | modules/luci-base/root/usr/libexec/rpcd/luci | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/luci-base/root/usr/libexec/rpcd/luci b/modules/luci-base/root/usr/libexec/rpcd/luci index 10c1691b9..5bd17c75d 100755 --- a/modules/luci-base/root/usr/libexec/rpcd/luci +++ b/modules/luci-base/root/usr/libexec/rpcd/luci @@ -582,6 +582,17 @@ local methods = { local sys = require "luci.sys" return { result = sys.net.conntrack() } 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 } } |