[Nagiosplug-devel] AIX 5.3 np 1.4.13 check_procs
Kyle O'Donnell
kyleodonnell at gmail.com
Wed Mar 4 18:43:42 CET 2009
I have been unable to formulate the syntax using the /usr/bin/ps
command (using ibm or berkeley options)
Our AIX admin says using the sysv binary is fine.
Here are the outputs you requested:
compiled defaults ps output:
$ /usr/bin/ps -eo 'stat uid pid ppid vsz pcpu comm args'
S UID PID PPID VSZ %CPU COMMAND COMMAND
A 0 1 0 588 0.0 init /etc/init
A 1500 77844 1 524 0.0 nrpe /opt/nagios/bin/nrpe -c
/opt/nagios/etc/nrpe.cfg -d -n
A 0 82042 1 468 0.0 syncd /usr/sbin/syncd 60
A 0 94378 1 128 0.0 shlap64 /usr/ccs/bin/shlap64
A 0 98398 1 652 0.0 errdemon /usr/lib/errdemon
A 0 151552 221196 312 0.0 syslogd /usr/sbin/syslogd -r
A 0 155690 221196 288 0.0 rpc.lockd /usr/sbin/rpc.lockd -d 0
A 0 163908 1 560 0.0 sshd2 /usr/local/sbin/sshd2
A 0 168012 221196 1628 0.0 rpc.mountd /usr/sbin/rpc.mountd
A 0 172206 233594 164 0.0 auditstream /usr/sbin/auditstream
A 0 176214 221196 424 0.0 inetd /usr/sbin/inetd
A 1 184364 221196 1404 0.0 rpc.statd /usr/sbin/rpc.statd -d 0 -t 50
A 0 188594 221196 1400 0.0 IBM.DRMd /usr/sbin/rsct/bin/IBM.DRMd
A 0 192520 221196 948 0.0 portmap /usr/sbin/portmap
A 0 209082 221196 408 0.0 xntpd /usr/sbin/xntpd
A 0 221196 1 680 0.0 srcmstr /usr/sbin/srcmstr
A 0 233594 1 188 0.0 alog alog -f /audit/audit.log
-s 200000000
A 0 237720 221196 148 0.0 biod /usr/sbin/biod 6
A 0 241804 221196 2344 0.0 rmcd /usr/sbin/rsct/bin/rmcd
-a IBM.LPCommands -r
A 0 245912 1 388 0.0 cron /usr/sbin/cron
A 0 258192 233594 548 0.0 auditpr auditpr -v
A 0 262324 1 504 0.0 getty /usr/sbin/getty /dev/console
A 0 266378 221196 184 0.0 nfsd /usr/sbin/nfsd 3891
A 0 270498 221196 1440 0.0 IBM.ServiceRMd
/usr/sbin/rsct/bin/IBM.ServiceRMd
A 0 282766 221196 2620 0.0 IBM.CSMAgentRMd
/usr/sbin/rsct/bin/IBM.CSMAgentRMd
A 0 295002 1 1516 0.0 dsmc dsmc schedule
A 847782414 344200 380974 552 0.0 ps /usr/bin/ps -eo stat
uid pid ppid vsz pcpu comm args
A 847782414 380974 454832 536 0.0 ksh -ksh
A 0 454832 163908 1008 0.0 sshd2 /usr/local/sbin/sshd2
the output of the sysv ps binary:
$ /usr/sysv/bin/ps -eo 's uid pid ppid vsz rss pcpu etime comm args'
S UID PID PPID VSZ RSS %CPU ELAPSED COMMAND COMMAND
A 0 1 0 616 636 0.0 19-04:17:44 init /etc/init
A 1500 77844 1 584 588 0.0 19-02:51:36 nrpe
/opt/nagios/bin/nrpe -c /opt/nagios/etc/nrpe.cfg -d -n
A 0 82042 1 468 472 0.0 19-04:17:34 syncd
/usr/sbin/syncd 60
A 0 94378 1 160 168 0.0 19-04:17:33 shlap64
/usr/ccs/bin/shlap64
A 0 98398 1 708 736 0.0 19-04:17:34 errdemon
/usr/lib/errdemon
A 0 151552 221196 332 348 0.0 19-04:17:02 syslogd
/usr/sbin/syslogd -r
A 0 155690 221196 288 288 0.0 19-04:16:55 rpc.lockd
/usr/sbin/rpc.lockd -d 0
A 0 163908 1 1948 1116 0.0 19-04:17:04 sshd2
/usr/local/sbin/sshd2
A 0 168012 221196 1660 1696 0.0 19-04:16:57 rpc.mountd
/usr/sbin/rpc.mountd
A 0 172206 233594 168 176 0.0 19-04:16:54 auditstream
/usr/sbin/auditstream
A 0 176214 221196 448 464 0.0 19-04:17:02 inetd
/usr/sbin/inetd
A 1 184364 221196 1448 1468 0.0 19-04:16:55 rpc.statd
/usr/sbin/rpc.statd -d 0 -t 50
A 0 188594 221196 1488 1516 0.0 19-04:16:42 IBM.DRMd
/usr/sbin/rsct/bin/IBM.DRMd
A 0 192520 221196 980 996 0.0 19-04:17:01 portmap
/usr/sbin/portmap
A 0 209082 221196 596 644 0.0 19-04:16:57 xntpd
/usr/sbin/xntpd
A 0 221196 1 716 732 0.0 19-04:17:11 srcmstr
/usr/sbin/srcmstr
A 847782414 225512 380974 312 332 0.0 00:00 ps
/usr/sysv/bin/ps -eo s uid pid ppid vsz rss pcpu etime comm args
A 0 233594 1 208 220 0.0 19-04:16:54 alog alog
-f /audit/audit.log -s 200000000
A 0 237720 221196 148 148 0.0 19-04:16:57 biod
/usr/sbin/biod 6
A 0 241804 221196 2868 2984 0.0 19-04:16:50 rmcd
/usr/sbin/rsct/bin/rmcd -a IBM.LPCommands -r
A 0 245912 1 424 444 0.0 19-04:16:55 cron /usr/sbin/cron
A 0 258192 233594 568 584 0.0 19-04:16:54 auditpr auditpr -v
A 0 262324 1 548 576 0.0 19-04:14:51 getty
/usr/sbin/getty /dev/console
A 0 266378 221196 192 184 0.0 19-04:16:57 nfsd
/usr/sbin/nfsd 3891
A 0 270498 221196 1704 1632 0.0 19-04:16:48 IBM.ServiceRMd
/usr/sbin/rsct/bin/IBM.ServiceRMd
A 0 282766 221196 3444 3288 0.0 19-04:16:47
IBM.CSMAgentRMd /usr/sbin/rsct/bin/IBM.CSMAgentRMd
A 0 295002 1 4468 2760 0.0 15-02:19:21 dsmc dsmc schedule
A 847782414 380974 454832 732 768 0.0 00:39 ksh -ksh
A 0 454832 163908 2396 1564 0.0 00:43 sshd2
/usr/local/sbin/sshd2
On 3/3/09, Kyle O'Donnell <kyleodonnell at gmail.com> wrote:
> I'll send the output when I get back to the office tomorrow. I have also
> asked our AIX guru about the general availability of /usr/sysv/bin/ps
> binary. When you read the man page both versions of ps are covered so I
> imagine it is part of the base OS, but I will confirm.
>
> I have still yet to find the proper syntax of /usr/bin/ps. It seems
> printing all the required fields in one command is not possible (stat, uid,
> pid, ppid, vsz, rss, pcpu, etime, comm, args).
>
>
> I'd love to donate to tinderbox, but I don't think my employer would allow
> it, that and our network is fairly restricted.
>
> Our shop has pretty much everything (aix 5.2 5.3 6.1 sol 8,9,10, hpux
> 10.20,11.00, 11.11, 11.23, linux*), so if there is anything I can do to
> assist, let me know.
>
> FYI
>
> I just tested the exact same ps options on solaris 8 (using /usr/bin/ps
> instead) and it fixed my etime issue. I believe my currently compiled
> check_procs on solaris10 is working, but I think i modified the ps command
> during compile time as well (this was a build against 1.4.11)
>
> I started trying to figure out pst3 but it appears that /usr/ucb/ps does
> not
> behave the same as /usr/bin/ps and some of the fields are named
> differently. I need to get a better understand of the /proc structure in
> solaris.
>
> --kyleo
>
> On Tue, Mar 3, 2009 at 6:21 PM, Ton Voon <ton.voon at opsera.com> wrote:
>
>> Hi Kyle,
>>
>> On 3 Mar 2009, at 20:09, Kyle O'Donnell wrote:
>>
>> > It appears the the default ps command for AIX does not include the rss
>> > and etime output. I have not been able to formulate a proper
>> > /usr/bin/ps command to obtain all of the required ps fields for check
>> > procs. However, I have been able to use /usr/sysv/bin/ps which can be
>> > used in the following way:
>> >
>> > --with-ps-command=/usr/sysv/bin/ps -eo 's uid pid ppid vsz rss pcpu
>> > etime comm args' --with-ps-format=%s %d %d %d %d %d %f %s %s %n
>> > --with-ps-cols=10
>> > --with-ps-
>> > varlist
>> > =
>> > procstat
>> > ,&procuid
>> > ,&procpid
>> > ,&procppid,&procvsz,&procrss,&procpcpu,procetime,procprog,&pos
>> >
>> > Here is the default compiled check_procs
>> > /opt/nagios/libexec/check_procs -w 1 -c 1 -m RSS -C init -vv
>> > CMD: /usr/bin/ps -eo 'stat uid pid ppid vsz pcpu comm args'
>> > RSS OK: 1 process with command name 'init'
>> >
>> > /opt/nagios/libexec/check_procs -w 420 -c 420 -m RSS -C init -vv
>> > CMD: /usr/bin/ps -eo 'stat uid pid ppid vsz pcpu comm args'
>> > RSS OK: 1 process with command name 'init'
>> >
>> >
>> > Here is the one I compiled with the options above:
>> > ./plugins/check_procs -w 1 -c 1 -m RSS -C init -vv
>> > CMD: /usr/sysv/bin/ps -eo 's uid pid ppid vsz rss pcpu etime comm
>> > args'
>> > Matched: uid=0 vsz=636 rss=420 pid=1 ppid=0 pcpu=0.00 stat=A
>> > etime=209-02:58:19 prog=init args=/etc/init
>> > RSS CRITICAL: 1 crit, 0 warn out of 1 process with command name
>> > 'init' [init]
>> >
>> > ./plugins/check_procs -w 420 -c 420 -m RSS -C init -vv
>> > CMD: /usr/sysv/bin/ps -eo 's uid pid ppid vsz rss pcpu etime comm
>> > args'
>> > Matched: uid=0 vsz=636 rss=420 pid=1 ppid=0 pcpu=0.00 stat=A
>> > etime=209-03:00:03 prog=init args=/etc/init
>> > RSS OK: 1 process with command name 'init'
>> >
>> >
>> > I'll continue working on the /usr/bin/ps syntax, but here is a work
>> > around.
>>
>> That's an interesting workaround.
>>
>> Can you send me a complete ps output for that sysv ps (with any
>> sensitive data scrubbed) as I want to create a test case for this.
>>
>> I'm always a little bit wary of putting changes to the configure
>> script for the ps syntax checking, especially if we can't see the
>> impact it has made on other OSes.
>>
>> Also, would you be interested in donating a tinderbox build server:
>> http://tinderbox.opsera.com/nagiosplug/status.html
>> . This helps us see what is building and what is failing on your
>> favourite OS. Instructions here:
>> http://nagiosplugins.opsera.com/tinderbox
>>
>> Ton
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
>> CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the
>> Enterprise
>> -Strategies to boost innovation and cut costs with open source
>> participation
>> -Receive a $600 discount off the registration fee with the source code:
>> SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> _______________________________________________________
>> Nagios Plugin Development Mailing List
>> Nagiosplug-devel at lists.sourceforge.net
>> Unsubscribe at
>> https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
>> ::: Please include plugins version (-v) and OS when reporting any issue.
>> ::: Messages without supporting info will risk being sent to /dev/null
>>
>
More information about the Devel
mailing list