Linux command to check memory usage in percentage

In this article let’s discuss about Linux command to check memory usage in percentage. Let’s go through the following methods without any delay.

Method 1:

free -m

If you are facing any issues with the above approach then try the alternative that is given below. It may look similar by have a try!

Method 2 :

$ free -t | awk 'NR == 2 {printf("Current Memory Utilization is : %.2f%"), $3/$2*100}'
or
$ free -t | awk 'FNR == 2 {printf("Current Memory Utilization is : %.2f%"), $3/$2*100}'

Current Memory Utilization is : 20.42%

Hope the above solution works.

Realted Posts : How to powershell connect to serial port