One of our AIX administrators claims that there is something wrong in memory calculation by the Zabbix-Agent.
I'm not familiar with AIX memory management but I got the following information out of the zabbix_agentd source code:
— SNIP src/libs/zbxsysinfo/aix/proc.c —
int PROC_MEM(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result)
— SNAP —
#ifdef HAVE_SYS_PROCFS_H /* AIX 5.x */
— SNIP —
value = psinfo.pr_size;
value <<= 10; /* kB to Byte */
— SNAP---
#else
value = procsinfo.pi_size;
value <<= 10; /* kB to Byte */
— SNIP src/libs/zbxsysinfo/aix/proc.c —
According to:
http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp
psinfo.pr_size is defined as 'size of process image in KB (1024) units' and should be correct.
Haven't found anything reliable about procsinfo.pi_size but according to:
http://www.linuxquestions.org/questions/aix-43/getprocs-does-not-give-the-process-information-correctly-449025/
it could be defined as 'size of image (pages)'. If that is correct the value needs to be converted to bytes instead to be shifted. But I'm not sure if this is the cause for the observed behavior:
Memory information from AIX about all running zabbix_agentd processes in MB:
- svmon -C zabbix_agentd -O summary=basic,unit=MB
Unit: MB
===============================================================================
Command Inuse Pin Pgsp Virtual
zabbix_agentd 90.1 30.6 0 89.9
Memory information from Zabbix about all running zabbix_agentd processes in Bytes:
Key: proc.mem[zabbix_agentd,zabbix]
Type of information: Numeric (unsigned)
Data type: Decimal
Item's value: 18866176
The used zabbix_agentd binary is the officially provided pre-compiled AIX 6.1 2.0.4 one.