k3oni/pydash — pull request #31 by gbourdin (2014-12-09 05:04:06+00:00)
Title: Fix memory usage report

This is a very small changeset that addresses an issue I ran into today: pydash was showing that all my memory was used and none of it was free when I actually had about 90% of free memory in my system.

The source of this issue was the fact that the amount of free memory reported by the command ```free``` is not the actual available memory in the system. Linux borrows unused memory for disk caching, so that needs to be accounted for and the memory used for cache and buffers should be counted as free memory.

This was easily noticeable in high I/O systems where a couple of minutes after reboot pydash would report all the system memory being used while most of it was actually still available.

There's a lot more details about this here: http://www.linuxatemyram.com/

Hope this helps!