Need help to interpret output of free command
I would appreciate help in interpreting the output of 'free -m' below.
-bash-4.2$ free -m
total used free shared buff/cache available
Mem: 15793 7112 88 7840 8591 611
Swap: 16891 5289 11602
- If I have nearly 11GB free then why am I seeing swap usage. Shouldn't that be 0?
- Also, the 'shared' value is 7840. Is this memory available for a new application?
- Is only 'cache' memory available for new applications? In other words, 'shared' and 'buffer' memory are not available for new applications?
- How should I interpret the 'available' column with a value of 611? How is this value arrived at?
Solution 1:
It says, your swap area is 16891 MBs. You allocated 5289 MBs, and there are 11602 MBs free swap area. Total = Used + Free
Shared: Memory used (mostly) by tmpfs (Shmem in /proc/meminfo)
Buffers: Memory used by kernel buffers (Buffers in /proc/meminfo)
Cache: Memory used by the page cache and slabs (Cached and SReclaimable in /proc/meminfo)
Available: Estimation of how much memory is available for starting new applications, without swapping. Unlike the data provided by the cache or free fields, this field takes into account page cache and also that not all reclaimable memory slabs will be reclaimed due to items being in use.
You can read more with command man free
- You have 11GB free swap area, not memory, so you should see 5289 MB swap usage.
- Memory available for new application is 611 MBs, as you can see under available column.
- No, only available column shows available memory for applications.
- See previous answer
Edit: Found a topic about recent change in free
command. Can be useful.