How is the total memory utilization calculated for a Linux server monitor?
Memory utilization is calculated using the "free" command. The output of this command varies according to the Linux distribution used.
Memory Utilized = ( (Total - Free Memory) / Total * 100 )
Free Memory = ( Total - Used + Buffer + Cache )
Free Memory = (16313900 - 7857128 + 203152 + 4381116) = 13041040
Memory Utilized = ( (Total-Free) / Total * 100) = 20.06%
This is applicable when using Linux flavors including Centos/Redhat 7+, Ubuntu 16+ etc.
Total Memory = 16330916 Free Memory = Available Memory = 9157464
Thus, Memory Utilized = ( ( Total - Free Memory ) / Total * 100 )
Memory Utilized = 43.92%
Note: The value obtained can be cross verified with the System Monitor (a default tool present in Linux servers for basic metrics monitoring) output.