I'm on Ubuntu 14.04 and trying to run
/usr/lib/nagios/plugins/check_procs -C rsyslogd -w 1:3 -c 1:5 -s S
and it returns
PROCS CRITICAL: 0 processes with command name 'rsyslogd', STATE = S | procs=0;1:3;1:5;0;
So I run with -vvv
and find that check_procs
uses the command /bin/ps axwwo 'stat uid pid ppid vsz rss pcpu etime comm args'
to list processes. I find my rsyslogd process and it is listed as follows:
Ssl 101 406 1 256232 25392 0.0 157-05:57:14 rsyslogd rsyslogdproc#=0 uid=101 vsz=256232 rss=25392 pid=406 ppid=1 pcpu=0.00 stat=Ssl etime=157-05:57:14 prog=rsyslogd args=rsyslogd
Looking at the help for the command it says:
-s, --state=STATUSFLAGS
Only scan for processes that have, in the output of `ps`, one or
more of the status flags you specify (for example R, Z, S, RS,
RSZDT, plus others based on the output of your 'ps' command).
So it really should be working. Just for testing I tried to run
/usr/lib/nagios/plugins/check_procs -C rsyslogd -w 1:3 -c 1:5 -s Ssl
This command returns the result I expect from the first command:
PROCS OK: 1 process with command name 'rsyslogd', STATE = Ssl | procs=1;1:3;1:5;0;
check_procs is v1.5.
I have the same test command working on a RHEL 6.5 server so it could be Ubuntu specific I guess.