Monitoring RAM
The free command displays the total amount of free and used physical and swap memory in the system.
Basic Output
bash $ free total used free shared buff/cache available Mem: 4096000 1800000 1200000 200000 896000 1800000 Swap: 2097148 0 2097148
The numbers are in bytes, making them hard to read.
Human Readable Output (-h)
bash $ free -h total used free shared buff/cache available Mem: 4.0G 1.8G 1.2G 200M 896M 1.8G Swap: 2.0G 0B 2.0G
Key Metrics
- used: Memory currently in use by applications and the kernel.
- buff/cache: Memory used by the kernel for filesystem buffers and page cache. This memory is considered 'free' in the sense that the system can immediately reclaim it if an application needs it.
- available: The estimated memory available for starting new applications without swapping.