mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
debug info
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
local skynet = require "skynet"
|
||||
local print_r = require "print_r"
|
||||
|
||||
local cmd = { ... }
|
||||
|
||||
skynet.start(function()
|
||||
local list = skynet.call(".launcher","lua", unpack(cmd))
|
||||
for k,v in pairs(list) do
|
||||
print(k,v)
|
||||
if list then
|
||||
print_r(list)
|
||||
end
|
||||
skynet.exit()
|
||||
end)
|
||||
@@ -26,6 +26,15 @@ function command.STAT()
|
||||
skynet.ret(skynet.pack(list))
|
||||
end
|
||||
|
||||
function command.INFO(handle)
|
||||
if services[handle] == nil then
|
||||
skynet.ret(skynet.pack(nil))
|
||||
else
|
||||
local result = skynet.call(handle,"debug","INFO")
|
||||
skynet.ret(skynet.pack(result))
|
||||
end
|
||||
end
|
||||
|
||||
function command.KILL(handle)
|
||||
skynet.kill(handle)
|
||||
skynet.ret( skynet.pack({ [handle] = tostring(services[handle]) }))
|
||||
|
||||
Reference in New Issue
Block a user