From b2d6f2f6555be8d2b4edb2fcc9499de8e6491c82 Mon Sep 17 00:00:00 2001 From: qiminbao Date: Fri, 31 Oct 2025 14:16:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E5=AD=98=E5=88=A9=E7=94=A8=E7=8E=87?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tongran/agent/client/service/impl/SystemServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/tongran/agent/client/service/impl/SystemServiceImpl.java b/src/main/java/com/tongran/agent/client/service/impl/SystemServiceImpl.java index a7a6ad8..51c6fe2 100644 --- a/src/main/java/com/tongran/agent/client/service/impl/SystemServiceImpl.java +++ b/src/main/java/com/tongran/agent/client/service/impl/SystemServiceImpl.java @@ -5,6 +5,7 @@ import com.tongran.agent.client.core.vo.SystemVO; import com.tongran.agent.client.service.SystemService; import com.tongran.agent.client.utils.AgentDataUtil; import com.tongran.agent.client.utils.AgentUtil; +import com.tongran.agent.client.utils.AssertLog; import org.springframework.stereotype.Service; import oshi.SystemInfo; import oshi.hardware.CentralProcessor; @@ -165,6 +166,7 @@ public class SystemServiceImpl implements SystemService { // long buffers = memInfo.getOrDefault("Buffers", 0L); // double actualUsage = (double)(total - available - cached - buffers) / total * 100; double actualUsage = (double)(total - available) / total * 100; + AssertLog.info("memoryUtilizationCollect,内存使用率:{}",actualUsage); System.out.printf("实际内存使用率: %.2f%%\n", actualUsage); return actualUsage; } catch (IOException e) {