From fd07af0a3d8f6a8c72ab860ba0ffcfe7b92b1eb8 Mon Sep 17 00:00:00 2001 From: shaoying Date: Mon, 24 Aug 2020 11:31:25 +0800 Subject: [PATCH] opt some --- base/cli/cli.go | 4 ++-- base/tcp/tcp.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/base/cli/cli.go b/base/cli/cli.go index c992a115..2f257b01 100644 --- a/base/cli/cli.go +++ b/base/cli/cli.go @@ -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 { diff --git a/base/tcp/tcp.go b/base/tcp/tcp.go index 70e868ca..c25d406a 100644 --- a/base/tcp/tcp.go +++ b/base/tcp/tcp.go @@ -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) {