.TH n-c-longuserprocesses 1 "February 2008" "ngtx" .SH NAME nagios-check-longuserprocesses \- shows minutes and pid of longest running user process .SH SYNOPSIS .B nagios-check-longuserprocesses \fIMIN-UID \fR [EXCLUDE-PROCESSNAME1 [EXCLUDE-PROCESSNAME2]] [...] .SH DESCRIPTION This program searches for the longest running process with the given minimum UID and prints the time running in minutes and the process ID. Processnames to be skipped may be specified as optional arguments. If no process with given attributes is running just two lines with "0" are printed. The process attributes are read from /proc/*/status and /proc/*/stat. .br The primary purpose is the usage as nagios remote plugin with net-snmp. Just add to snmpd.conf a single line like this: .IP extend .1.3.6.1.4.1.2021.99 cron /usr/local/sbin/nagios-check-longuserprocesses 630 vsftpd bash .PP .SH "RETURN VALUE" The return value is 1 on any open or read error. On success 0 is returned. .SH EXAMPLES nagios-check-longuserprocesses 630 vsftpd .SH AUTHOR Frank Bergmann, http://www.tuxad.com