mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-27 06:39:31 +00:00
dd5f62227a
The memory information reported by the supervisor currently estimates the value of used memory as `MemTotal - MemFree`. However, linux systems will try to cache and buffer as much memory as possible, which will affect the output of `MemFree` (from /proc/meminfo) and in consequence the memory usage seen by the user on the dashboard, which will appear much greater than it is. The correct calculation should be `MemTotal - MemFree - Buffers - Cached`, which the calculation performed by `htop` and the `free` commands. Change-type: patch Signed-off-by: Felipe Lalanne <felipe@balena.io> Connects-to: #1471