<div dir="ltr">Hi Jochen,<div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

I'ld assume that if you cannot get away from an aged OS distrib, you're<br>
unlikely to find a newer plugin version on a reputed repo, anyway, and<br>
command line control of the "ps" command is definitely absent from<br>
versions up to and including the current 1.4.16. If so, I don't see any<br>
way for you *other* than giving sources and (*if* necessary - see the<br>
'stat' in my command above) explicit "./configure" options a try.<br>
<br></blockquote><div><br></div><div><div>I tried to configure both 1.4.15 and 1.4.16, and on the same box where the rpm is compiled I see the same ps command you see:</div><div><br></div><div><div> /usr/local/src/nagios-plugins-1.4.16 > grep -A 1 -B 1 '[^A-Z_]PS_' config.h</div>

<div>/* Number of columns in ps command */</div><div>#define PS_COLS 9</div><div><br></div><div>/* Verbatim command to execute for ps in check_procs */</div><div>#define PS_COMMAND "/bin/ps axwo 'stat uid pid ppid vsz rss pcpu comm args'"</div>

<div><br></div><div>/* Format string for scanning ps output in check_procs */</div><div>#define PS_FORMAT "%s %d %d %d %d %d %f %s %n"</div><div><br></div><div>/* Whether the ps utility uses the "procetime" field */</div>

<div>/* #undef PS_USES_PROCETIME */</div><div><br></div><div>/* Variable list for sscanf of 'ps' output */</div><div>#define PS_VARLIST procstat,&procuid,&procpid,&procppid,&procvsz,&procrss,&procpcpu,procprog,&pos</div>

</div><div><br></div><div><br></div><div>Problem is then the repo, but the OS seem fine to compile nagios-plugins on my own. Even if I'm sure something won't be right with dependencies.</div></div><div><br></div>
<div>
 </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Another word of warning, though: Have a look at the plugin's help text:<br>
<br>
>  -s, --state=STATUSFLAGS<br>
>    Only scan for processes that have, in the output of `ps`, one or<br>
>    more of the status flags you specify (for example R, Z, S, RS,<br>
>    RSZDT, plus others based on the output of your 'ps' command).<br>
<br>
The listed process state( char)s are *mutually exclusive*, and the<br>
interpretation of the --state option is that processes will be included<br>
into the selection if *ANY* of the chars appear in their s/stat column.<br>
In other words, you can select for 's'(ession leaders), but won't be<br>
able to make sure that it's not, e.g., 'Zs' or otherwise defunct within<br>
the same check.<br></blockquote><div><br></div><br class=""><div>I think -ss would be enough for me, as my final checker would be:</div><div><br></div><div>/usr/lib64/nagios/plugins/check_procs -c 1:1 -ss -C schedule_cron<br>

</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
(Been there, done that, wrote my own check_nagios_procs explicitly<br>
telling the '^[RS]sl$' master process from its temporary children. :-} )<br>
<div class=""><div class="h5"><br>
Regards,<br>
                                                                J. Bern<br>
--<br>
*NEU* - NEC IT-Infrastruktur-Produkte im <<a href="http://www.linworks-shop.de/" target="_blank">http://www.linworks-shop.de/</a>>:<br>
Server--Storage--Virtualisierung--Management SW--Passion for Performance<br>
Jochen Bern, Systemingenieur --- LINworks GmbH <<a href="http://www.LINworks.de/" target="_blank">http://www.LINworks.de/</a>><br>
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt<br>
PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27<br>
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202<br>
Unternehmenssitz Weiterstadt, Geschäftsführer Metin Dogan, Oliver Michel<br>
</div></div></blockquote></div><br></div></div>