[ZBX-6564] AIX system.uptime is wrong with 32bit agent Created: 2013 May 04 Updated: 2019 Apr 26 Resolved: 2016 Jul 22 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G), Documentation (D) |
Affects Version/s: | 2.0.6 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Blocker |
Reporter: | Carlos Rodrigues | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 1 |
Labels: | aix, overflow, uptime | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
AIX 5.3 and 6.1 with 32bit zabbix_agentd (downloaded from "www.zabbix.com/download.php"). |
Issue Links: |
|
Description |
I have a few AIX servers, and zabbix is reporting wrong uptime for the ones which have been up for a long time: One of the machines (AIX 6.1) has 685+ days of uptime, but zabbix reports a little more than 188 days. This seems like a 32bit bug. I've recompiled the agent as a 64bit binary, and this made the problem go away. For completeness, these where the steps I took to rebuild zabbix_agentd for 64bit: CFLAGS='-maix64' ./configure --enable-agent
make ARFLAGS="-cru -X64" strip -X64 src/zabbix_agent/zabbix_agentd |
Comments |
Comment by richlv [ 2013 May 04 ] |
in general, 32bit agents will work on 64bit systems but may fail in some cases. for a quite different os, but similar, problem, see we should probably : (1) document this martins-v Added as a general note to: https://www.zabbix.com/documentation/2.0/manual/concepts/agent |
Comment by richlv [ 2013 May 04 ] |
(2) be explicit about aix agent platform on the download page |
Comment by Carlos Rodrigues [ 2013 May 04 ] |
But does it make sense to only have 32bit binaries for AIX on the download page? I don't think many people are running 32bit AIX 5.3 kernels, much less AIX 6.1... |
Comment by richlv [ 2013 May 04 ] |
that's more of a feature request that a bug, though |
Comment by Neiro [ 2013 Jul 03 ] |
Can you attach your compiled binary zabbix_agentd to this thread or send to my email (neiromc[AT]gmail.com) |
Comment by Carlos Rodrigues [ 2013 Jul 05 ] |
Here you go: http://cloud.carlos-rodrigues.com/bugs/zabbix_agentd.2.0.6.aix61.64bit.gz |
Comment by Kim Jongkwon [ 2016 Jul 07 ] |
AIX 7.1 has same problem with system.uptime. 2016-07-05 10:57:48 1467683868 507737 2016-07-05 10:47:48 1467683268 507137 $ uptime 10:58AM up 502 days, 23:31, 1 user, load average: 0.13, 0.13, 0.14 2016-06-29 14:07:48 1467176868 737 2016-06-29 13:57:48 1467176268 137 2016-06-29 13:47:48 1467175668 4294966834 2016-06-29 13:37:48 1467175068 4294966235 2016-06-29 13:27:48 1467174468 4294965634 2016-06-29 13:17:48 1467173868 4294965034 Also, after 248+ days of system.uptime has completely changed values from 248 to 49461 (Days). |
Comment by Andris Mednis [ 2016 Jul 14 ] |
There was a similar issue Seems like a natural solution is to use only 64-bit Zabbix agent on AIX, too. We could change build scripts to make 64-bit agent by default. |
Comment by Andris Mednis [ 2016 Jul 20 ] |
Proposed solution Do not use 32-bit Zabbix agent on AIX, just compile the agent in 64-bit mode. No Zabbix source code modification is required. Zabbix agent on UNIX uses iconv() function which may be part of libc or supplied by a dedicated libiconv library. Compiling 64-bit GNU libiconv on AIX Download source http://ftp.gnu.org/gnu/libiconv/, then: $ gunzip -c libiconv-1.14.tar.gz | tar xf - $ cd libiconv-1.14 $ unset OBJECT_MODE $ CFLAGS="-maix64 -g -O2" ./configure --disable-shared --prefix=`pwd` $ export OBJECT_MODE=64 $ make install The newly built liibrary contains 64-bit objects: $ ar -tv -X64 lib/libiconv.a rw-r--r-- 210/210 1473346 Jul 20 20:27 2016 iconv.o rw-r--r-- 210/210 44232 Jul 20 20:27 2016 localcharset.o rw-r--r-- 210/210 35078 Jul 20 20:27 2016 relocatable.o and no 32-bit objects: $ ar -tv -X32 lib/libiconv.a (nothing is shown) iconv is 64-bit executable: $ file bin/iconv bin/iconv: 64-bit XCOFF executable or object module not stripped Location of libiconv (will be used in the next step): $ pwd /admin/tmp/andris/libiconv-1.14 Compiling 64-bit Zabbix agent and utilities on AIX $ gunzip -c zabbix-3.0.4rc1.tar.gz | tar xf - $ cd zabbix-3.0.4rc1 $ export OBJECT_MODE=64 $ CFLAGS="-maix64 -g -O2" ./configure --enable-agent --with-iconv=/admin/tmp/andris/libiconv-1.14 --prefix=`pwd` .... Configuration: Detected OS: aix6.1.1.0 Install path: /admin/tmp/andris/zabbix-3.0.4rc1 Compilation arch: aix Compiler: /admin/tmp/andris/zabbix-3.0.4rc1/compile gcc Compiler flags: -maix64 -g -O2 Library-specific flags: iconv: -I//admin/tmp/andris/libiconv-1.14/include Enable server: no Enable proxy: no Enable agent: yes Agent details: TLS: no Linker flags: -L//admin/tmp/andris/libiconv-1.14/lib Libraries: -lm -lperfstat -liconv ... $ make install Executable files are 64-bit: $ file bin/z* sbin/z* bin/zabbix_get: 64-bit XCOFF executable or object module not stripped bin/zabbix_sender: 64-bit XCOFF executable or object module not stripped sbin/zabbix_agentd: 64-bit XCOFF executable or object module not stripped Library dependencies: $ ldd sbin/zabbix_agentd sbin/zabbix_agentd needs: /usr/lib/libc.a(shr_64.o) /usr/lib/libperfstat.a(shr_64.o) /unix /usr/lib/libcrypt.a(shr_64.o) /usr/lib/libpthreads.a(shr_xpg5_64.o) /usr/lib/libcfg.a(shr_64.o) /usr/lib/libodm.a(shr_64.o) /usr/lib/libcorcfg.a(shr_64.o) /usr/lib/liblvm.a(shr_64.o) /usr/lib/libsrc.a(shr_64.o) This procedure was tested with Zabbix agent versions 2.0, 3.0 and trunk. |
Comment by Andris Mednis [ 2016 Jul 20 ] |
Can somebody test the proposed solution ? I have neither access to AIX machine with uptime > 497 days nor a clean, standard AIX installation |
Comment by Andris Mednis [ 2016 Jul 21 ] |
Got a feedback that 64-bit agent solves the issue. |