Closed KreativeKrise closed 3 years ago
Hey, thanks for your contribution. Technically speaking cached memory isn't free (it's cached ;). But I get your point. Thinking about existing (historical) data it might not seem a good idea to change the calculation of free memory. What do you think about calling it usable memory from now on? Like this:
OK - 70.7% usable (232.4 MB free and 1032.0 cached out of 1828.1 MB) |memory_total=1871928c memory_unused=1323004c memory_percent=70% memory_cached=1031928c
Yes, that makes totally sense. Since I don't use historical data yet, I didn't thought on that use case.
Please take a look at my update, check it at your environment and provide feedback. If everything works I will merge the PR
Keep in mind that if #9 gets merged you need to update your check command ;)
@all-contributors please add @KreativeKrise for code
@wernerfred
I've put up a pull request to add @KreativeKrise! :tada:
The memory calculation should also count cached memory into unused memory, because cached memory will be freed when applications require it.