Start a conversation

How to calculate total free memory?

Overview

This article provides information on how to calculate total free memory.

Information

/proc/meminfo
  • More on this can be checked by running the command man free
  • However, if buffers and Cache (reclaimable memory) is also taken into account, then Available Memory might be more suitable.
  • Formula for calculating % available memory is:
free -m | awk '/^Mem/ {print "Total Mem:", $2, "Total Mem (Free):", ($7)/$2*100, "%"}' OFMT="%.2f"
  • Sample snapshot of the output is:

Note: The understanding of Used and Free memory is subjective. The above formula is provided as per our best understanding based on RHEL forums and manuals, which you may consult for more information.

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted
  3. Updated

Comments