From 8eca467733977a1a0b078c49cc626ed3083fc8af Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Tue, 24 Oct 2023 10:48:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=B3=BB=E7=BB=9F=E4=BF=A1=E6=81=AFCPU?= =?UTF-8?q?=E6=A0=B8=E5=BF=83=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/monitor/service/system_info.impl.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/monitor/service/system_info.impl.go b/src/modules/monitor/service/system_info.impl.go index 4747ea3e..13f48b2a 100644 --- a/src/modules/monitor/service/system_info.impl.go +++ b/src/modules/monitor/service/system_info.impl.go @@ -90,12 +90,12 @@ func (s *SystemInfoImpl) MemoryInfo() map[string]any { // CPUInfo CPU信息 func (s *SystemInfoImpl) CPUInfo() map[string]any { - var core int32 = 0 + var core int = 0 var speed string = "未知" var model string = "未知" cpuInfo, err := cpu.Info() if err == nil { - core = cpuInfo[0].Cores + core = runtime.NumCPU() speed = fmt.Sprintf("%.0fMHz", cpuInfo[0].Mhz) model = strings.TrimSpace(cpuInfo[0].ModelName) }