Hi!
I'm using Zabbix to monitor my Proxmox containers and I faced the problem.
Zabbix item for getting total memory vm.memory.size[total] returns amount of mem on Proxmox host instead of memory inside a container. Although, value MemTotal from /proc/meminfo is correct.
Also, Zabbix uses MemAvailable as actual amount of free ram for host. But in the containers MemAvailable equals MemFree.
Here is listing from LXC-node:
I tried to parse output of /proc/meminfo and calculate actual free memory as sum of MemFree, Buffers and Cached, but as you can see, Buffers = 0Kb, and again Zabbix gets value for Proxmox host.
Could you explain this behavior?
How do I monitor ram in containers?
I'm using Debian Jessie 8.7 for Proxmox.
Zabbix 3.2.6
Debian Jessie as a LXC OS.
I'm using Zabbix to monitor my Proxmox containers and I faced the problem.
Zabbix item for getting total memory vm.memory.size[total] returns amount of mem on Proxmox host instead of memory inside a container. Although, value MemTotal from /proc/meminfo is correct.
Also, Zabbix uses MemAvailable as actual amount of free ram for host. But in the containers MemAvailable equals MemFree.
Here is listing from LXC-node:
Code:
cat /proc/meminfo
MemTotal: 3121152 kB
MemFree: 641612 kB
MemAvailable: 641612 kB
Buffers: 0 kB
Cached: 2437208 kB
SwapCached: 0 kB
Active: 1254132 kB
Inactive: 1225316 kB
Active(anon): 6080 kB
Inactive(anon): 36560 kB
Active(file): 1248052 kB
Inactive(file): 1188756 kB
Unevictable: 0 kB
Mlocked: 3520 kB
SwapTotal: 524288 kB
SwapFree: 471924 kB
Dirty: 252 kB
Writeback: 0 kB
AnonPages: 1212060 kB
Mapped: 137808 kB
Shmem: 161448 kB
Slab: 0 kB
SReclaimable: 0 kB
SUnreclaim: 0 kB
KernelStack: 8592 kB
PageTables: 42660 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 8734824 kB
Committed_AS: 5521492 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 175680 kB
DirectMap2M: 16592896 kB
I tried to parse output of /proc/meminfo and calculate actual free memory as sum of MemFree, Buffers and Cached, but as you can see, Buffers = 0Kb, and again Zabbix gets value for Proxmox host.
Could you explain this behavior?
How do I monitor ram in containers?
I'm using Debian Jessie 8.7 for Proxmox.
Zabbix 3.2.6
Debian Jessie as a LXC OS.
Code:
uname -r
4.4.59-1-pve