Monitoring Memory
Jump to navigation
Jump to search
free command
The free command when used by itself will display memory usage in kilobytes. It displays total memory available, used, and swap memory in addition to cache and buffers.
# displays output in bytes free -b # displays output in megabytes free -m # displays output in gigabytes free -g # displays output in human-readable format free -h # continuously polls free every {number of seconds} free -s {number of seconds} # free will output every 3 seconds free -s 3
free example
[root@he fast]# free -h total used free shared buffers cached Mem: 126G 125G 532M 176K 510M 94G -/+ buffers/cache: 30G 95G Swap: 8.0G 995M 7.0G [root@he fast]# free -g total used free shared buffers cached Mem: 126 125 0 0 0 94 -/+ buffers/cache: 30 95 Swap: 7 0 7