free's Examples

free Command: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 Command

top

The simplest way to check the RAM memory usage is to display the contents of the /proc/meminfo virtual file. This file is used by the freetopps , and other system information commands.

cat /proc/meminfo

ps_mem Script

sudo pip3 install ps_mem

output in bytes

-b

output in kibibytes

-k

output in mebibytes

-m

 Display System Memory

free

 Display Memory in Gigabytes

free -g

Display Total Line

free -t

Display Memory Status for Regular Intervals

free -s

Show Low and High Memory Statistics

free -l

Check Free Version

free -V

Showing the Column Totals

free -h -t

Showing Memory Usage in Other Metrics

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

DevOpsSchool
Typically replies within an hour

DevOpsSchool
Hi there 👋

How can I help you?
×
Chat with Us