[Nagiosplug-help] checking if a process is running on Linux

Bob Ingraham bobi at netshel.net
Sat Jul 8 00:55:04 CEST 2006


The check_procs command takes a "range" for the -w and -c options that
allows you to specify either a minimum, a maximum or both for the number
of processes that you are monitoring.

So, for example to specify a minimum of 10 "ping" processes for warning
level notification and a minimum of 5 for critical notification, you'd
specify:

./check_procs -w 10: -c 5: -C ping

>From the "check_procs --help" output:

RANGEs are specified 'min:max' or 'min:' or ':max' (or 'max'). If
specified 'max:min', a warning status will be generated if the
count is inside the specified range.

I believe this is the behavior that you are looking for.

Bob

> I looked at that. Seems problematic. The command seems to be designed
> for checking for too many processes. No too few. My process
> runs as 4 processes. If I specify:
>
> ./check_procs -C myproc the output is:
>
> root:/usr/lib/nagios/plugins# ./check_procs -C myproc 2&>1
> System call sent warnings to stderr
> PROCS WARNING: 4 processes with command name 'myproc'
>
> I don't know how to tell is to be normal is it is running and critical
> if it is not.
>
> Thoughts?
>
> \\Greg






More information about the Help mailing list