Table of Contents
nagios-check-process - count instances of a process
nagios-check-process
PROCESS-NAME [...]
This program counts processes with the name
specified as first argument. If no process with given name is running then
it prints 9999. The process name is searched for in all /proc/*/stat files.
Any additional arguments are silently ignored and can be used as a mark
for i.e. searching a snmpwalk output with less.
The primary purpose is the usage as nagios remote plugin with net-snmp. Just
add to snmpd.conf a single line like this:
- extend .1.3.6.1.4.1.2021.59 cron /usr/local/sbin/nagios-check-process
cron PROCSCRON
The return value is 1 if opendir /proc failed.
On success 0 is returned.
nagios-check-process cron
Frank Bergmann,
http://www.tuxad.com
Table of Contents