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.
This commit is contained in:
wdlut 2023-12-05 21:01:36 +01:00 committed by GitHub
parent a6640d533c
commit 532992b03f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}