From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/119194-check_procs.patch | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 web/attachments/119194-check_procs.patch (limited to 'web/attachments/119194-check_procs.patch') diff --git a/web/attachments/119194-check_procs.patch b/web/attachments/119194-check_procs.patch new file mode 100644 index 0000000..3510483 --- /dev/null +++ b/web/attachments/119194-check_procs.patch @@ -0,0 +1,34 @@ +*** check_procs.c.orig Wed Dec 29 16:41:39 2004 +--- check_procs.c Tue Feb 8 10:42:34 2005 +*************** +*** 187,197 **** + procppid, procpcpu, procstat, + procetime, procprog, procargs); + +! /* Ignore self */ + if (strcmp (procprog, progname) == 0) { + continue; + } + + if ((options & STAT) && (strstr (statopts, procstat))) + resultsum |= STAT; + if ((options & ARGS) && procargs && (strstr (procargs, args) != NULL)) +--- 187,204 ---- + procppid, procpcpu, procstat, + procetime, procprog, procargs); + +! /* Ignore command line self */ +! + if (strcmp (procprog, progname) == 0) { + continue; + } + ++ /* Ignore self in process arguments to prevent problems when ++ check_procs is called via shell (i.e. check_nrpe) */ ++ ++ if (strstr (procargs, progname) != NULL) ++ continue; ++ + if ((options & STAT) && (strstr (statopts, procstat))) + resultsum |= STAT; + if ((options & ARGS) && procargs && (strstr (procargs, args) != NULL)) -- cgit v1.2.3-74-g34f1