[ZBX-5552] incorrect memory amount for "vm.memory.size[total]" under FreeBSD Created: 2012 Sep 07  Updated: 2017 May 30  Resolved: 2012 Sep 25

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

Type: Incident report Priority: Major
Reporter: Oleksii Zagorskyi Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: freebsd, memory
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

FreeBSD



 Description   

Real memory is 2GB, but:

  1. zabbix_get -s 10.20.0.20 -k vm.memory.size
    2124775424
  2. zabbix_get -s 10.20.0.20 -k vm.memory.size[total]
    23599611904
  3. zabbix_get -s 10.20.0.20 -k system.uname
    FreeBSD mon 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010 [email protected]:/usr/obj/usr/src/sys/GENERIC i386
  4. zabbix_get -s 10.20.0.20 -k agent.version
    2.1.0

So, the vm.memory.size[total] is doing something wrong.



 Comments   
Comment by Alexei Vladishev [ 2012 Sep 08 ]

If you have some time, please also test with 2.0.x.

Comment by Oleksii Zagorskyi [ 2012 Sep 11 ]

yes, please, it's the same freebsd box:

# ./zabbix_agentd -V
Zabbix Agent (daemon) v2.0.0 (revision 27675) (21 May 2012)
Compilation time: Aug 21 2012 14:12:03
# ./zabbix_agentd -t vm.memory.size
vm.memory.size                                [u|2124775424]
# ./zabbix_agentd -t vm.memory.size[total]
vm.memory.size[total]                         [u|23599611904]


# ./zabbix_agentd -V
Zabbix Agent (daemon) v2.0.1 (revision 28455) (27 June 2012)
Compilation time: Aug 21 2012 14:10:32
# ./zabbix_agentd -t vm.memory.size
vm.memory.size                                [u|2124775424]
# ./zabbix_agentd -t vm.memory.size[total]
vm.memory.size[total]                         [u|23599611904]


# ./zabbix_agentd -V
Zabbix Agent (daemon) v2.0.2 (revision 29214) (31 July 2012)
Compilation time: Sep 11 2012 00:24:56
# ./zabbix_agentd -t vm.memory.size
vm.memory.size                                [u|2124775424]
# ./zabbix_agentd -t vm.memory.size[total]
vm.memory.size[total]                         [u|23599611904]
Comment by Alexander Vladishev [ 2012 Sep 25 ]

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

zalex_ua dev branch tested - works fine now.

Andris Can somebody test the fix on 32-bit FreeBSD with more than 4 GB physical memory and a PAE kernel? Or just run "sysctl hw.physmem" command on such system and tell result ?

Comment by Andris Mednis [ 2012 Sep 26 ]

Successfully tested on 32-bit and 64-bit FreeBSD.
Documents
http://web.archiveorange.com/archive/v/2AdLpFn5TYbk0WTHRk3P
http://www.opennet.ru/openforum/vsluhforumID1/93151.html
suggest that even with this fix "vm.memory.size[total]" will be incorrect on 32-bit FreeBSD with PAE kernel and more than 4 GB memory.

Comment by Alexander Vladishev [ 2012 Oct 03 ]

Fixed in pre-2.0.4 r30500 and pre-2.1.0 (trunk) r30501.

Generated at Thu Mar 28 14:23:47 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.