[ZBX-13645] Agent does not compile and run on AIX 7.1 TL0 (requires TL1) Created: 2018 Mar 23  Updated: 2024 Apr 10  Resolved: 2018 Sep 03

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 3.0.15
Fix Version/s: 3.0.22rc1, 3.4.14rc1, 4.0.0beta2, 4.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Andris Mednis Assignee: Andris Mednis
Resolution: Fixed Votes: 0
Labels: AIX, compilation
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

IBM AIX 7.1


Attachments: Text File config.log     File patch_agent_3.0.15_AIX71.patch    
Issue Links:
Causes
caused by ZBX-11902 CPU monitoring issues in AIX 7.1 Closed
Team: Team A
Team: Team A
Sprint: Sprint 38, Sprint 39, Sprint 40, Sprint 41
Story Points: 3

 Description   

Solution for ZBX-11902 added dependency on AIX API perfstat_partition_config(). This function is available starting from AIX 7.1 TL1 (Technical Level 1). So, Zabbix agent does not compile on AIX 7.1 TL0. Also, compiled on AIX 7.1 TL1, the agent does not start on AIX 7.1 TL0.



 Comments   
Comment by Andris Mednis [ 2018 Mar 23 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-13645 (for 3.0).
Also patch attached in file "patch_agent_3.0.15_AIX71.patch".

Comment by Andris Mednis [ 2018 Mar 23 ]

Some comments on proposed solution:

  • In SYSTEM_CPU_NUM() the function perfstat_partition_config() was replaced with perfstat_partition_total(). Hopefully, online_lcpus from perfstat_partition_total_t returned by perfstat_partition_total() has the same value as lcpus from perfstat_partition_config_t returned by perfstat_partition_config().
  • In zbx_get_cpu_num() the function perfstat_partition_config() was simply deleted. Surprisingly, this part of code (#elif defined HAVE_LIBPERFSTAT) was not invoked at all ! Instead, the number of CPUs was computed by sysconf(_SC_NPROCESSORS_CONF) (#elif defined(_SC_NPROCESSORS_CONF - in this part). I assume that sysconf(_SC_NPROCESSORS_CONF) is available on every AIX.

Currently our access is limited to AIX oslevel 7100-04. It would be a good idea if someone could test it on different AIX versions.

Comment by Andris Mednis [ 2018 Jul 18 ]

For AIX 6.1 TL0:

Workaround 1. Use an older Zabbix version: 3.0.12, 3.2.9, 3.4.3 should compile. The breaking change was introduced in ZBX-11902 in versions 3.0.13, 3.2.10, 3.4.4.

Workaround 2: If you want to use the newest 3.0, (like 3.0.19), then on AIX 6.1 TL0 you can try to replace in file src/libs/zbxsysinfo/aix/cpu.c function SYSTEM_CPU_NUM() implementation with an older implementation from 3.0.12. (the files src/libs/zbxsysinfo/aix/cpu.c in 3.0.12 and 3.0.19 differ only in SYSTEM_CPU_NUM() implementation). So, you can get a source code of 3.0.19, replace its file src/libs/zbxsysinfo/aix/cpu.c with a file from 3.0.12 and go. The item "system.cpu.num" will change its meaning from to number of logical CPUs back to physical CPUs (as discussed ZBX-11902).

Comment by Andris Mednis [ 2018 Aug 29 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-6565-13645-14559-30 (based  on 3.0.22rc1) which contains proposed fixes for:

Tested on AIX 6.1 TL0, 7.1 TL0, 7.1 TL4.

Comment by Andris Mednis [ 2018 Aug 31 ]

Fixed in versions:

  • pre-3.0.22rc1 r84412
  • pre-3.4.14rc1 r84415
  • pre-4.0.0beta2 (trunk) r84416
Comment by Andris Mednis [ 2018 Aug 31 ]

Documented in
https://www.zabbix.com/documentation/3.0/manual/introduction/whatsnew3022

The same change should be documented in "What's new in Zabbix 3.4.14".

martins-v RESOLVED for 3.4.14

andris Thanks, Martins! Reviewed.

Generated at Sat Apr 20 15:10:57 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.