[ZBX-13246] On AIX the proc.num command line has a 2 KB limit. Created: 2017 Dec 14  Updated: 2024 Apr 10  Resolved: 2018 Jan 18

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 3.0.13, 4.0.0alpha1, 4.0 (plan)
Fix Version/s: 3.0.15rc1, 3.4.7rc1, 4.0.0alpha3, 4.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Kazuo Ito Assignee: Viktors Tjarve
Resolution: Fixed Votes: 0
Labels: proc.num
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File aix_procnum_size.patch    
Issue Links:
Duplicate
is duplicated by ZBX-17134 AIX procfs parsing is reading truncat... Closed
Team: Team A
Sprint: Sprint 23, Sprint 24, Sprint 25
Story Points: 0.5

 Description   

I would like AIX to also make the following fixes supported by Zabbix 1.8.11.

https://www.zabbix.com/documentation/1.8/manual/about/what_s_new_1.8.11

Command line arguments that exceed 2KB are now supported in proc.num and proc.mem checks on Linux

/include/common.h

#define MAX_ID_LEN		21
#define MAX_STRING_LEN		2048
#define MAX_BUFFER_LEN		65536

/src/libs/zbxsysinfo/aix/proc.c

static int	check_procargs(struct procentry64 *procentry, const char *proccomm)
{
	int	i;
	char	procargs[MAX_STRING_LEN];

	if (0 != getargs(procentry, (int)sizeof(*procentry), procargs, (int)sizeof(procargs)))
		return FAIL;

	for (i = 0; i < sizeof(procargs) - 1; i++)
	{
		if ('\0' == procargs[i])
		{
			if ('\0' == procargs[i + 1])
				break;

			procargs[i] = ' ';
		}
	}

	if (i == sizeof(procargs) - 1)
		procargs[i] = '\0';

	return NULL != zbx_regexp_match(procargs, proccomm, NULL) ? SUCCEED : FAIL;
}


 Comments   
Comment by Viktors Tjarve [ 2018 Jan 10 ]

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

Currently unable to test this fix on AIX platform.

Comment by Viktors Tjarve [ 2018 Jan 15 ]

Released in:

  • 3.0.15rc1 r76817
  • 3.4.7rc1 r76840
  • 4.0.0alpha3 r76841
Generated at Thu Apr 25 23:59:41 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.