The command line you describe is something that can be done with the 'current', default "ps" command on AIX as well. You can replace
/usr/sysv/bin/ps -eo 's uid pid ppid vsz rss pcpu etime comm args'
with the equivalent:
/usr/bin/ps -eo 'st uid pid ppid vsz rssize pcpu etime comm args'
I haven't got a recent version of Nagios on AIX myself, so I cannot check. If the check_procs plug-in is a shell script, you could make a copy of it and change the original to use the ps command I mentioned above.
As I believe the Nagios plug-in is a binary, so you probably cannot change the command it uses to get its information. Until Nagios releases a version that does not rely on /usr/sysv/bin/ps, you could do a little trick:
- Recreate the /usr/sysv/bin directory
- Create a "wrapper" shell script called check_procs; it should call the /usr/bin/ps command above.
- Make it executable (like chmod 0750)
If you notice Nagios uses /usr/sysv/bin/ps more often (with different command line arguments), you have to change the wrapper script to look at the arguments that Nagios uses and build the proper /usr/bin/ps command for those occasions.
Something quick and dirty that might help you out to start with:
#!/usr/bin/ksh
echo "command: $0 $*" >>/tmp/ps.log
if [ "$1" = "-eo" -a "$2" = "s uid pid ppid vsz rss pcpu etime comm args" ]
then /usr/bin/ps -eo 'st uid pid ppid vsz rssize pcpu etime comm args'
elif [ "$1" = "-eo" -a "$2" = "pid comm args" ]
then /usr/bin/ps -eo "$2"
else echo "Unknown combination of arguments to /usr/sysv/bin/ps" >&2
fi
------------------------------
Richard Westerik
Principal specialist
Simac IT NL bv
Ede
+31651575123
------------------------------