Skip to content

Commit

Permalink
添加判断ci的长度
Browse files Browse the repository at this point in the history
  • Loading branch information
wwng2333 authored Jan 5, 2024
1 parent 6aa7e0a commit 425bb07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/monitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func GetHost(agentConfig *model.AgentConfig) *model.Host {
count, err := cpu.Counts(false)
if err != nil {
println("cpu.Counts error:", err)
} else {
} else if len(ci) > 0 {
ret.CPU = append(ret.CPU, fmt.Sprintf("%s %d %s Core", ci[0].ModelName, count, cpuType))
}

Expand Down

0 comments on commit 425bb07

Please sign in to comment.