Last Updated on 2012-10-25.
If you use Nagios for checking if a certain process running under Linux, you might have recognized that check_procs does not always work correctly.
If you have a long process name to check (e.g. /usr/bin/php meow.php asdf), it shows you 0 running processes, even if it is definitely running.
Append ” -vv” to your check_procs command to see which ps parameters the script uses. Then run the ps command yourself and have a look at the output.
In the most cases the process names get cut, so it cannot compare correctly.
You only have to accomodate your process name to the shorter one, which you see in the ps command.
Get more information here.