From 532992b03fd6f2930ab0bf6b1e5db4a92b842ecb Mon Sep 17 00:00:00 2001 From: wdlut <97447303+wdlut@users.noreply.github.com> Date: Tue, 5 Dec 2023 21:01:36 +0100 Subject: [PATCH] BUGFIX: Values returned by linux_memUtilization() not useful. MemFree is the free physical memory. (#5596) Since the Linux kernel uses free memory for caching, this value is usually very small. MemAvailble is an estimate of how much memory is available for starting new applications, without swapping. MemFree is the free physical memory. Using this value gives much more meaningful results. --- agents/modules_meshcore/sysinfo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agents/modules_meshcore/sysinfo.js b/agents/modules_meshcore/sysinfo.js index 88c8e5bc..78979f33 100644 --- a/agents/modules_meshcore/sysinfo.js +++ b/agents/modules_meshcore/sysinfo.js @@ -159,7 +159,7 @@ function linux_memUtilization() case 'MemTotal:': ret.total = parseInt(tokens[tokens.length - 2]); break; - case 'MemFree:': + case 'MemAvailable:': ret.free = parseInt(tokens[tokens.length - 2]); break; }