Hi
since the days of Java (TM) the length of the arguments for
processes has increased by a factor of, at least, 10.
In most cases the part which really distinguishes processes from
each other starts at, say, position 2049. Unfortunately,
this is true in our environment
The implementation in the AIX agent (using the for monitoring purposes unuseable Sys V
/proc filesystem file psinfo) limits the command line length to 80 characters !
(see /usr/include/sys/procfs.h).
If AIX5L (L like Linux) is not installed on the system where the
agent is compiled and therefore the /proc filesystem does not exist, another
attempt is done in the agent to get the process list and the command-line information.
The call to popen, again, is limited to 2048 characters
because of the usage of "-oargs=".
In the manual page to ps it says truncation may occur and
that is exactly what happens. Obviously, the limit is 2048 characters.
However, using ps -f -p pid will show the complete command-line.
Unfortunately, I don't have an AIX 5.3 system where I can compile the
agent, so it does not make sense to post an untested patch.
Can somebody please create an 1.6.6 ZABBIX agent - with libperfstat installed - using the above mentioned ps
command (instead of the current ps command or /proc filesystem used in the agent) for me ?
Source is in src/libs/zbxsysinfo/aix/proc.c
Thanks in advance.
Regards
Norbert.
since the days of Java (TM) the length of the arguments for
processes has increased by a factor of, at least, 10.
In most cases the part which really distinguishes processes from
each other starts at, say, position 2049. Unfortunately,
this is true in our environment

The implementation in the AIX agent (using the for monitoring purposes unuseable Sys V
/proc filesystem file psinfo) limits the command line length to 80 characters !
(see /usr/include/sys/procfs.h).
If AIX5L (L like Linux) is not installed on the system where the
agent is compiled and therefore the /proc filesystem does not exist, another
attempt is done in the agent to get the process list and the command-line information.
The call to popen, again, is limited to 2048 characters
because of the usage of "-oargs=".
In the manual page to ps it says truncation may occur and
that is exactly what happens. Obviously, the limit is 2048 characters.
However, using ps -f -p pid will show the complete command-line.
Unfortunately, I don't have an AIX 5.3 system where I can compile the
agent, so it does not make sense to post an untested patch.
Can somebody please create an 1.6.6 ZABBIX agent - with libperfstat installed - using the above mentioned ps
command (instead of the current ps command or /proc filesystem used in the agent) for me ?
Source is in src/libs/zbxsysinfo/aix/proc.c
Thanks in advance.
Regards
Norbert.
Comment