ZABBIX BUGS AND ISSUES

Zabbix agent incorrect calculates vm.memory.size[available] on i386 Solaris

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.4rc1, 2.1.0
  • Fix Version/s: 2.0.4rc1, 2.1.0
  • Component/s: Agent (G)
  • Labels:
  • Zabbix ID:
    RTF

Description

# prtconf | more
 System Configuration: Oracle Corporation i86pc
 Memory size: 8190 Megabytes
 System Peripherals (Software Nodes):

# 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

Activity

Hide
Alexey Pustovalov added a comment -

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).

Show
Alexey Pustovalov added a comment - 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).
Hide
Andris Mednis added a comment -

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

Show
Andris Mednis added a comment - Thanks, Alexey, for finding the error! I think this bug happens on Solaris if system memory is larger than 2 GB.
Hide
Andris Mednis added a comment -

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

Show
Andris Mednis added a comment - Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-5722.
Hide
dimir added a comment -

Successfully tested!

Show
dimir added a comment - Successfully tested!
Hide
Andris Mednis added a comment -

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

Show
Andris Mednis added a comment - Fixed in versions pre-2.0.4 rev. 31559 and pre-2.1.0 rev. 31560.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: