User-friendliness: Use Available Memory from procfs.meminfo

I know this has been brought up before, but since MineOS uses os.freemem the RAM FREE stat is misleading. I’d like to see MineOS use MemAvailable as reported by procfs-stats instead of having to run free in a terminal. Is there a technical limitation preventing it’s use or is it just low priority? :slight_smile:

I agree–MemAvailable is a much better choice in good, useful details to provide in the webui.

I think previously I had chosen FreeMem merely because it was part of the os module, which is ubiquitous on all systems that support NodeJS.

That said, since procfs-stats is already included as a dependency, I have implemented the new metric in a commit I just wrote:

Thanks for the feature request!

That was quick, thanks!

Interestingly enough, it seems the MemAvailable metric doesn’t really match up with it’s namesake in the free command; my system is showing 18GB free, whereas the server still reports the Free metric at ~800MB. The Cached metric shows correctly, however, so I suspect an issue with the procfs-stats module.

EDIT: Running meminfo from a standalone script reported the value correctly, and after changing the metric from Cached back to MemAvailable and restarting the MineOS service again, it’s reporting correctly. :confused: