Linux Free Command

The command /bin/free or /usr/bin/free displays information about the total amount of free and used memory (including swap) on the system. It also includes information about the buffers and cache used by the kernel. Helpful for the admins to get the quick information about the memory usage in their servers. Sample output

 

Free Command

 

When using free, remember the Linux memory architecture and the way the virtual memory manager works. Below is the screen-caps of free command output stats (system with 4GB of RAM)

 

Free stats

 

Free command include the following syntax :

-b, -k, -m, -g Display values in bytes, kilobytes, megabytes, and gigabytes

-l Distinguishes between low and high memory

-c <count> Displays the free output <count> number of times

Listing the Memory zone

 

Using the -l option, you can see how much memory is used in each memory zone. Following is the output of 32 bit and 64 bit systems. 32 Bit :

 

Free Command 32 bit

 

Output on 64 Bit systems :

 

Free command 64 bit

 

 

Notice that 64-bit systems no longer use high memory. You can also determine how many chunks of memory are available in each zone using /proc/buddyinfo file (cat /proc/buddyinfo).