1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-26 01:24:05 +08:00
This commit is contained in:
shaoying 2020-08-24 11:31:25 +08:00
parent 96ad7ec058
commit fd07af0a3d
2 changed files with 3 additions and 2 deletions

View File

@ -102,7 +102,7 @@ var Index = &ice.Context{Name: "cli", Help: "命令模块",
}},
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
msg := m.Spawn()
msg.Split(m.Cmdx(SYSTEM, "ps", "aux"), "", " ", "\n")
msg.Split(m.Cmdx(SYSTEM, "ps", "u"), "", " ", "\n")
msg.Table(func(index int, value map[string]string, head []string) {
if m.Appendv(ice.MSG_APPEND, "action", head); len(arg) == 2 && value["PID"] == arg[1] {
m.Push("action", m.Cmdx(mdb.RENDER, "button", "结束"))
@ -118,7 +118,7 @@ var Index = &ice.Context{Name: "cli", Help: "命令模块",
RUNTIME: {Name: "runtime name auto", Help: "运行环境", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
switch kit.Select("", arg, 0) {
case "procinfo":
m.Split(m.Cmdx(SYSTEM, "ps"), "", " ", "\n")
m.Split(m.Cmdx(SYSTEM, "ps", "u"), "", " ", "\n")
case "hostinfo":
if f, e := os.Open("/proc/cpuinfo"); e == nil {

View File

@ -124,6 +124,7 @@ var Index = &ice.Context{Name: "tcp", Help: "通信模块",
}
port = kit.Format(kit.Int(port) + 1)
}
os.MkdirAll(p, ice.MOD_DIR)
m.Echo(port)
}},
}, Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {