How is Memory Utilization calculated for Linux server?
Formula :
Memory Utilization (%) = 100 -(((MemFree + Buffers + Cached)*100)/maxValue)
In Telnet/SSH mode:
We are using free -b command to get the memory usage for Linux server. Assume the output below,
# free -b
total used free shared buffers cached
Mem: 18787995648 18667773952 120221696 0 95801344 9579597824
-/+ buffers/cache: 8992374784 9795620864
Swap: 18876977152 352256 18876624896
Memory Utilization (%) = 100 -(((MemFree + Buffers + Cached)*100)/maxValue)
Memory Utilization (%) = 100 - (((120221696+95801344+9579597824)*100)/18787995648) =979562086400/18787995648 = 100 - 52.13 = 47.87 = 48% (Rounded value)
Memory Utilization (MB) = maxValue-(MemFree + Buffers + Cached)
Memory Utilization (MB) = 18787995648 - (120221696+95801344+9579597824)
= 18787995648 - 9795620864
= 8992374784 This is Bytes.
To convert this is MB = 8992374784/(1024/1024) = 8575MB
In SNMP mode:
We are using UCD-SNMP-MIB file to get memory usage for Linux servers. OID's used for,
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
Related Articles
How is Memory Utilization calculated for FreeBSD server?
Memory Utilization is calculated using the below formula: Memory Utilization (%) = (used / total) * 100 where, used - Used Memory total - Total Memory Telnet/SSH mode In Telnet/SSH mode, we use the following commands to obtain the memory usage ...
How is CPU Utilization calculated for Linux server?
Telnet/SSH mode: We are using /usr/bin/vmstat 1 3 command to get the CPU Utilization for Linux servers. Assume the output below: #/usr/bin/vmstat 1 3 procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd ...
How is Memory Utilization calculated in SUN Solaris server?
Memory Calculation We run the below command to check if the SUN server is a zone-supported server: /usr/bin/prstat -n 1 -Z 1 1 2> /dev/null|grep -v "PID"|grep -v "Total:" If the command gives the proper output then we conclude that the server is ...
How is Memory Utilization calculated for AIX server?
Formula : Memory Utilization (%) = (Total Memory - Free Memory) / Total Memory where Free Memory = Free + Buffers + Cached In Telnet/SSH mode: We are using svmon -G command to get the memory usage value. For example consider the below output: ...
How is CPU Utilization calculated in the SUN Solaris Server?
In SUN Solaris Server, CPU Utilization is calculated based on Idlecputime. Idlecputime is calculated from the command vmstat 1 3 and it is subtracted from 100 to find the CPUUtilization.