[ZBX-8513] vm.memory.size[free] and vm.memory.size[available] return same value on AIX Created: 2014 Jul 22  Updated: 2017 May 30  Resolved: 2015 Mar 29

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 2.0.12, 2.2.4
Fix Version/s: 2.5.0

Type: Incident report Priority: Blocker
Reporter: Kodai Terashima Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: aix, memory
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   

vm.memory.size[free] and vm.memory.size[available] return same value on AIX.

$ ./zabbix_agentd -t vm.memory.size[available]
vm.memory.size[available] [u|491425792]
$ ./zabbix_agentd -t vm.memory.size[free]
vm.memory.size[free] [u|491425792]

It seems that vm.memory.size[free] include cache size on AIX platform.



 Comments   
Comment by Aleksandrs Saveljevs [ 2015 Jan 09 ]

In the current implementation, both "free" and "available" use "real_free" member from "perfstat_memory_total_t" structure, see http://www-01.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.files/libperfstat.h.htm .

What should be the desired output? Is there any system tool that can serve as a reference?

Comment by Andris Zeila [ 2015 Jan 13 ]

I understand it should give similar results to Linux platform, so available should be free + cached. So we should calculate free memory as real_free - numperm.

wiper Err, it should be the other way around - free appears to be correct, we should calculate available as real_free + numperm.

Comment by Kodai Terashima [ 2015 Jan 13 ]

I also understand that it should work like Linux platform. The result of vmstat on AIX seems doesn't include cached memory. I think it's better that free returns a value same as vmstat (available - cached).

# vmstat -v
4194304 memory pages
42509 free pages
78.7 numperm percentage
3132135 file pages
Comment by Andris Zeila [ 2015 Feb 16 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-8513

Comment by Andris Zeila [ 2015 Feb 16 ]

(1) Documentation:

RESOLVED

sasha CLOSED

Comment by dimir [ 2015 Feb 18 ]

Looks fine, it's just strange that the numbers of free differ just a bit reported by zabbix_agent and "vmstat -v". In the following table source means:

  • old - old binary (before this fix)
  • new - new binary (after this fix)
  • vmstat - values from vmstat multiplied by 4096
  • empty - was not changed in this fix
source param key value
  free vm.memory.size[free] [u|395374592]
  cached vm.memory.size[cached] [u|320503808]
old available vm.memory.size[available] [u|395374592]
new available vm.memory.size[available] [u|715878400]
old pavailable vm.memory.size[pavailable] [d|21.620108]
new pavailable vm.memory.size[pavailable] [d|39.146269]
vmstat free   394203136
vmstat cached   320503808
vmstat avail (free+cached)   714706944
Comment by dimir [ 2015 Feb 18 ]

Successfully tested.

Comment by dimir [ 2015 Feb 18 ]

Regarding Solaris, unfortunately using sysconf() it is not possible to get more information about physical memory except total and available.

Comment by Andris Zeila [ 2015 Mar 09 ]

Released in:

  • pre-2.5.0 r52628
Generated at Sat Apr 20 12:31:38 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.