Difference between revisions of "free memory on linux"

From thelinuxwiki
Jump to: navigation, search
(Created page with "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' ...")
 

Latest revision as of 16:43, 29 April 2014

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