Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve calculation for used system memory
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
- Loading branch information