[ZBX-9385] agentd for AIX ?lways return value 0 for key proc.num[,,run] Created: 2015 Mar 10  Updated: 2017 May 30  Resolved: 2015 May 19

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

Type: Incident report Priority: Major
Reporter: Vadim Shkarupa Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: aix, regression
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix Server - 2.4.4 on Linux;
Agentd agents_2.4.0.aix6100.powerpc, agents_2.4.1.aix6100.powerpc on AIX 6100-07-05-1228



 Description   

When I upgrade the agent version 2.4.0 or 2.4.1 on AIX server 6100-07-05-1228 key proc.num[,,run] (parameter "Number of running processes" in template "Template OS AIX") all return value 0.
When returning the agent version 2.2.1 value is displayed correctly.



 Comments   
Comment by Marc [ 2015 Mar 10 ]

I can confirm this behavior on AIX 6100-09-03-1415 with pre-compiled Zabbix agent 2.4.1.
A test with Zabbix agent 2.0.6 on the same machine doesn't show this behavior.

Comment by Igors Homjakovs (Inactive) [ 2015 Apr 08 ]

Fixed in svn://svn.zabbix.com/branches/dev/ZBX-9385

Comment by Aleksandrs Saveljevs [ 2015 Apr 09 ]

Alternative fix based on steki's patch in ZBX-5243 is available in development branch svn://svn.zabbix.com/branches/dev/ZBX-9385-alt .

The rationale behind the patch seems to be confirmed by pg_top source code at https://github.com/markwkm/pg_top/blob/master/machine/m_aix5.c#L502 :

/*
 * AIX marks all runnable processes as ACTIVE. We want to know which
 * processes are sleeping, so check used cpu and adjust status field
 * accordingly
 */
if (pp->pi_state == SACTIVE && pp->pi_cpu == 0)
	pp->pi_state = SIDL;

It was also noticed that a kernel process with PID=0 seems to always have pi_state=SACTIVE and have pi_cpu=120. It should be considered whether we wish to exclude it or not. (On Linux, we do not exclude kernel threads.)

Comment by dimir [ 2015 May 12 ]

Tested ZBX-9385-alt branch as it keeps support of "SLEEP" state of the process. Tested on AIX 5.3 and 6.1 .

Comment by dimir [ 2015 May 12 ]

FYI: this regression was introduced in ZBX-5243.

Comment by dimir [ 2015 May 12 ]

As for PID=0, I agree on including the main kernel process into the list of running processes (as it is implemented in the "alt" dev branch).

Comment by Aleksandrs Saveljevs [ 2015 May 13 ]

Fixed in pre-2.4.6 r53589 and pre-2.5.0 (trunk) r53590.

Generated at Tue May 20 07:19:19 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.