How is Memory Utilization calculated for Linux server?

How is Memory Utilization calculated for Linux server?


Note:  For version 16800 and above , the  Skip option will be under Settings -> Performance Polling -> Servers -> Linux monitor type.
Formula:
 (i) If Skip buffer and cache from monitoring (Applicable only for linux) option under Settings -> Performance Polling -> Servers Tab is not enabled. [By default, this option is not enabled]
Memory Utilization (%) = 100 -(((MemFree + Buffers + Cached)*100)/maxValue)
Memory Utilization (MB) = maxValue-(MemFree + Buffers + Cached)
(ii) If Skip buffer and cache from monitoring (Applicable only for linux) option under Settings -> Performance Polling -> Servers Tab is enabled.
Memory Utilization (%) = 100 - ((MemFree *100)/maxValue)
Memory Utilization (MB) = maxValue - MemFree

 In Telnet/SSH mode: 
testuser@testmachine:~$ free -b
              total                    used                 free                  shared            buff/cache      available
Mem:    12361719808  8122318848   274104320     370192384  3965296640  3541422080
Swap:   32212250624  4870012928   27342237696
MemFree corresponds to Mem:free 
Buffers + Cached corresponds to  Mem:buff/cache
maxValue corresponds to Mem:total
 (i) If Skip buffer and cache from monitoring (Applicable only for linux) option under Settings -> Performance Polling -> Servers Tab is not enabled.
Memory Utilization (%) = 100 -(((MemFree + Buffers + Cached)*100)/maxValue)
= 100 -(((274104320 + 3965296640)*100)/12361719808) 
= 65.705411336 = 65 %
Memory Utilization (MB) = maxValue-(MemFree + Buffers + Cached)
= 12361719808 - (274104320+3965296640) 
= 8122318848/(1024*1024) 
= 7746 MB
(ii) If Skip buffer and cache from monitoring (Applicable only for linux) option under Settings -> Performance Polling -> Servers Tab is enabled.
Memory Utilization (%) = 100 - ((MemFree *100)/maxValue)
          = 100 - ((274104320 *100)/12361719808)
          = 97.782636039 = 97%
Memory Utilization (MB) = maxValue - MemFree
= 12361719808 - 274104320
= 12087615488/(1024*1024) 
= 11527 MB

 In SNMP mode:
The UCD-SNMP-MIB file is used to get the memory usage for Linux servers. 
OIDs used for Physical memory utilisation calculation
 Total Memory              .1.3.6.1.4.1.2021.4.5.0
 Free Memory          .1.3.6.1.4.1.2021.4.6.0
 Buffer Memory              .1.3.6.1.4.1.2021.4.14.0
 Cached Memory             .1.3.6.1.4.1.2021.4.15.0

Physical memory calculation will change when the Skip buffer and cache option is enabled or disabled.
(i) Skip Buffer and Cache from monitoring is enabled
Memory used (in KB) = Total Memory - Free Memory
Physical memory utilisation (in %) = (Memory used (in KB) / Total Memory) * 100

(ii) Skip Buffer and Cache from monitoring is disabled
Memory used (in KB) = Total Memory - (Free Memory+Buffer Memory+Cached Memory)
Physical memory utilisation (in %) = (Memory used (in KB) / Total Memory) * 100

                  New to ADSelfService Plus?