Ad Widget

Collapse

AIX: proc.num - problem with argument matching (and solution)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NOB
    Senior Member
    Zabbix Certified Specialist
    • Mar 2007
    • 469

    #1

    AIX: proc.num - problem with argument matching (and solution)

    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.
    Last edited by NOB; 20-10-2009, 08:39. Reason: Corrected path to source
  • tighep
    Senior Member
    • Dec 2007
    • 124

    #2
    I'm still running 1.4.4 agents on my AIX systems, since they were patched and the patch didn't work on 1.6, but I can compile a 1.6.6 agent on my development systems to test. Do you have a specific patch you'd like done on that proc.c file?

    Comment

    • NOB
      Senior Member
      Zabbix Certified Specialist
      • Mar 2007
      • 469

      #3
      Originally posted by tighep
      I'm still running 1.4.4 agents on my AIX systems, since they were patched and the patch didn't work on 1.6, but I can compile a 1.6.6 agent on my development systems to test. Do you have a specific patch you'd like done on that proc.c file?
      Hi tighep

      thanks a lot for your offer.
      I created a quick and dirty fix (see attachment) just to test whether my idea for a solution (using ps -f -p pid) works.

      Regards

      Norbert.
      Attached Files

      Comment

      Working...