free
is the most commonly used command for checking the memory usage of a Linux system. It displays information about the total, used, and free memory.free -h
top
Commandtop
/proc/meminfo
virtual file. This file is used by the free
, top
, ps
, and other system information commands.cat /proc/meminfo
ps_mem
Scriptsudo pip3 install ps_mem
output in bytes |
-b
output in kibibytes
-k
output in mebibytes |
-m
free
free -g
free -t
free -s
free -l
free -V
free -h -t
free --mega
by using -h option shows the output in human readable format
free -h
by using free command we see the results for total, used and free memory on system by accessing the system kernel. it also displays the shared cache and available
$ free
it will show us onnly one output and this output will be changing at regular intervals
watch free -h
-s option is used to instriuts free command to refresh the puput for every 3 sec. to stop th process ctrl+c
free -s3
gives the output in mebibytes
free -m
use the si the power 1024 and in megabytes
free --si -m
-c option instructs the free command to automatocally quit after refreshing 4 times
free -c 4
to see the buffer and cache colums seperatly
free -w
total option instructs free to show the toatal memory of used,free total columns of memory and swap columns
free -h --total
the command produces ouput in mebibytes with 3 seconds delay and quits after refreshing the ouput for 4 times
free -m -s3 -c4