free memory on linux
From thelinuxwiki
One of the best ways to monitor the memory on the Linux-based system is to run 'cat /proc/meminfo' command.
You should sum these counters : 'MemFree' + 'Buffers' + 'Cached'
one liner script for real time monitoring (2.6 kernel)
# while true; do cat /proc/meminfo | grep -E "MemFree|Buffers|Cached" | awk '{s+=$2} END {print s}'; sleep 1; done