projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a84b63
)
luci-base: add luci/getProcessList RPC method
author
Jo-Philipp Wich
<jo@mein.io>
Sun, 3 Nov 2019 17:43:44 +0000
(18:43 +0100)
committer
Jo-Philipp Wich
<jo@mein.io>
Sun, 3 Nov 2019 19:03:25 +0000
(20:03 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/root/usr/libexec/rpcd/luci
patch
|
blob
|
history
diff --git
a/modules/luci-base/root/usr/libexec/rpcd/luci
b/modules/luci-base/root/usr/libexec/rpcd/luci
index 10c1691b966858a10ff91414ed885345f29ff7a2..5bd17c75d295ff6a93ae15df16c90db48aa90946 100755
(executable)
--- 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
}
}