[agent-go] new cpu status

This commit is contained in:
zeaslity
2023-03-30 16:45:01 +08:00
parent 3e9c95ed6d
commit d5193a3be1
5 changed files with 60 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import (
"agent-go/g"
logger2 "agent-go/logger"
"agent-go/register"
"agent-go/status"
"flag"
"fmt"
)
@@ -26,4 +27,12 @@ func main() {
// 执行初始化之策工作
register.AgentServerInfoCache = register.INIT()
// 测试调用CPU状态
getCpuMap, err := status.GetCpuMap()
if err != nil {
log.ErrorF("error is %v", err)
}
log.InfoF("cpu status is %v", getCpuMap)
}