I currently am using WSL, which doesn't have the MemAvailable metric in /proc/meminfo. Additionally, MemAvailable was added in the Linux 3.14 kernel, so this PR should help those with older kernels installed. This is what is contained in the memInfo object after calling mem.info():
{
totalMemMb: 16303.29,
usedMemMb: NaN,
freeMemMb: NaN,
freeMemPercentage: NaN
}
I have added a check to see if that property exists, and if not it will be calculated. After adding the fix, here is the new contents of memInfo on my machine, which seems to be fairly accurate:
I currently am using WSL, which doesn't have the
MemAvailable
metric in/proc/meminfo
. Additionally,MemAvailable
was added in the Linux 3.14 kernel, so this PR should help those with older kernels installed. This is what is contained in thememInfo
object after callingmem.info()
:I have added a check to see if that property exists, and if not it will be calculated. After adding the fix, here is the new contents of
memInfo
on my machine, which seems to be fairly accurate:I also fixed a typo, renaming
linuxFreeMemroy
tolinuxFreeMemory
.