[ZBX-5722] Zabbix agent incorrect calculates vm.memory.size[available] on i386 Solaris Created: 2012 Oct 22  Updated: 2017 May 30  Resolved: 2012 Nov 14

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 2.0.4rc1, 2.1.0
Fix Version/s: 2.0.4rc1, 2.1.0

Type: Incident report Priority: Major
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: agent, solaris
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   
  1. prtconf | more
    System Configuration: Oracle Corporation i86pc
    Memory size: 8190 Megabytes
    System Peripherals (Software Nodes):
  1. uname -a
    SunOS name 5.10 Generic_147441-12 i86pc i386 i86pc

./zabbix_get -s name -k vm.memory.size[available]
18446744073649700864 --> totaly WRONG

./zabbix_get -s name -k vm.memory.size[total]
8587792384

./zabbix_get -s name -k vm.memory.size[inactive] ZBX_NOTSUPPORTED
./zabbix_get -s name -k vm.memory.size[cached] ZBX_NOTSUPPORTED
./zabbix_get -s name -k vm.memory.size[free]
3120717824



 Comments   
Comment by Alexey Pustovalov [ 2012 Oct 22 ]

I suppose that root of problem in memory.c file:

static int      VM_MEMORY_AVAILABLE(AGENT_RESULT *result)
{
        SET_UI64_RESULT(result, sysconf(_SC_AVPHYS_PAGES) * sysconf(_SC_PAGESIZE));

        return SYSINFO_RET_OK;
}

There we do not use (zbx_uint64_t).

Comment by Andris Mednis [ 2012 Nov 14 ]

Thanks, Alexey, for finding the error!
I think this bug happens on Solaris if system memory is larger than 2 GB.

Comment by Andris Mednis [ 2012 Nov 14 ]

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

Comment by dimir [ 2012 Nov 20 ]

Successfully tested!

Comment by Andris Mednis [ 2012 Nov 21 ]

Fixed in versions pre-2.0.4 rev. 31559 and pre-2.1.0 rev. 31560.

Generated at Fri Mar 29 02:29:24 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.