Applications Systems
How Linux Agent polls memory statistics
This article explains how the Linux Agent polls memory statistics and the difference between Volume memory and CPU & Memory utilization
First published date
Last published date
Overview
- There are two ways that the SolarWinds Platform shows the memory utilization on Linux devices.
1- CPU & Memory (information stored in CPULoad tables)
2- Physical / Virtual Memory (information stored in Volumes tables)
- How is Memory utilization polled?
The Agent runs Python scripts using Linux commands to pull the memory information.
The following Linux commands are used:
#free
#vmstat
#cat /proc/meminfo
- How is the memory utilization shown in the web console ?
Volume Memory utilization is shown in the Disk Volumes widget in Web console.
CPU & Memory utilization is shown in the Average Memory Usage widget and CPU & Memory.
Issue: Sometimes, the difference between the memory utilization in "CPU & Memory" x "Volume Memory" is enormous and can confuse some customers. It happens because the way we calculate both methods is different.
Product section
Cause
Total memory = MemTotal
Used memory = MemTotal - (MemFree + Buffers + Cached)
Example:
24607824 - (216736 + 256252 + 18392896)
24607824 - 18865884 = 5,741,940 (5.7 Gb)
The Volume Memory is the Used
23 Gb
Resolution
The Linux Agent polls memory statistics from the /proc filesystem (/proc/meminfo) as follows:
| Value | Capacity | Used |
|---|---|---|
| Physical Memory | MemTotal | MemTotal-MemFree |
| Virtual Memory | MemTotal+SwapTotal | (MemTotal+SwapTotal) - (MemFree+SwapFree) |
| Swap Space | SwapTotal | SwapTotal-SwapFree |
| Shared Memory | Shmem | Shmem |
| Cached Memory | Cached | Cached |