mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-05 13:10:07 +00:00
优化 agent 信息上报与 ARM 安装面板的错误提示
This commit is contained in:
@@ -63,12 +63,12 @@ func GetHost() *model.Host {
|
||||
}
|
||||
}
|
||||
|
||||
func GetState(delay int64) *model.HostState {
|
||||
func GetState() *model.HostState {
|
||||
hi, _ := host.Info()
|
||||
mv, _ := mem.VirtualMemory()
|
||||
ms, _ := mem.SwapMemory()
|
||||
var cpuPercent float64
|
||||
cp, err := cpu.Percent(time.Second*time.Duration(delay), false)
|
||||
cp, err := cpu.Percent(0, false)
|
||||
if err == nil {
|
||||
cpuPercent = cp[0]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user