From cc2f5cbc08b6b8166ccd07fc088e5d76b41dded0 Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 9 Oct 2023 15:00:37 +0700 Subject: [PATCH] fixes #277 - bug: memory utilization always at 99% --- web/app/_hooks/useGetSystemResources.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/_hooks/useGetSystemResources.ts b/web/app/_hooks/useGetSystemResources.ts index 652461550..b90f19d14 100644 --- a/web/app/_hooks/useGetSystemResources.ts +++ b/web/app/_hooks/useGetSystemResources.ts @@ -14,7 +14,7 @@ export default function useGetSystemResources() { SystemMonitoringService.GET_CURRENT_LOAD_INFORMATION ); const ram = - (resourceInfor?.mem?.used ?? 0) / (resourceInfor?.mem?.total ?? 1); + (resourceInfor?.mem?.active ?? 0) / (resourceInfor?.mem?.total ?? 1); setRam(Math.round(ram * 100)); setCPU(Math.round(currentLoadInfor?.currentLoad ?? 0)); };