diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-29 22:03:24 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-09-29 22:03:24 (GMT) |
commit | 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch) | |
tree | 1c2b6b21704a294940f87c7892676998d8371707 /web/attachments/119194-check_procs.patch | |
download | site-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz |
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts,
and configuration files.
Diffstat (limited to 'web/attachments/119194-check_procs.patch')
-rw-r--r-- | web/attachments/119194-check_procs.patch | 34 |
1 files changed, 34 insertions, 0 deletions
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 @@ | |||
1 | *** check_procs.c.orig Wed Dec 29 16:41:39 2004 | ||
2 | --- check_procs.c Tue Feb 8 10:42:34 2005 | ||
3 | *************** | ||
4 | *** 187,197 **** | ||
5 | procppid, procpcpu, procstat, | ||
6 | procetime, procprog, procargs); | ||
7 | |||
8 | ! /* Ignore self */ | ||
9 | if (strcmp (procprog, progname) == 0) { | ||
10 | continue; | ||
11 | } | ||
12 | |||
13 | if ((options & STAT) && (strstr (statopts, procstat))) | ||
14 | resultsum |= STAT; | ||
15 | if ((options & ARGS) && procargs && (strstr (procargs, args) != NULL)) | ||
16 | --- 187,204 ---- | ||
17 | procppid, procpcpu, procstat, | ||
18 | procetime, procprog, procargs); | ||
19 | |||
20 | ! /* Ignore command line self */ | ||
21 | ! | ||
22 | if (strcmp (procprog, progname) == 0) { | ||
23 | continue; | ||
24 | } | ||
25 | |||
26 | + /* Ignore self in process arguments to prevent problems when | ||
27 | + check_procs is called via shell (i.e. check_nrpe) */ | ||
28 | + | ||
29 | + if (strstr (procargs, progname) != NULL) | ||
30 | + continue; | ||
31 | + | ||
32 | if ((options & STAT) && (strstr (statopts, procstat))) | ||
33 | resultsum |= STAT; | ||
34 | if ((options & ARGS) && procargs && (strstr (procargs, args) != NULL)) | ||