summaryrefslogtreecommitdiffstats
path: root/web/attachments/209675-check_procs.c-1.4.5-zombies-patch
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-09-29 22:03:24 (GMT)
commit0b6423f9c99d9edf8c96fefd0f6c453859395aa1 (patch)
tree1c2b6b21704a294940f87c7892676998d8371707 /web/attachments/209675-check_procs.c-1.4.5-zombies-patch
downloadsite-0b6423f9c99d9edf8c96fefd0f6c453859395aa1.tar.gz
Import Nagios Plugins site
Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files.
Diffstat (limited to 'web/attachments/209675-check_procs.c-1.4.5-zombies-patch')
-rw-r--r--web/attachments/209675-check_procs.c-1.4.5-zombies-patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/web/attachments/209675-check_procs.c-1.4.5-zombies-patch b/web/attachments/209675-check_procs.c-1.4.5-zombies-patch
new file mode 100644
index 0000000..6923bf5
--- /dev/null
+++ b/web/attachments/209675-check_procs.c-1.4.5-zombies-patch
@@ -0,0 +1,26 @@
1diff -Naur nagios-plugins-1.4.5/plugins/check_procs.c nagios-plugins-1.4.5-patched/plugins/check_procs.c
2--- nagios-plugins-1.4.5/plugins/check_procs.c 2006-10-23 00:03:31.000000000 +0200
3+++ nagios-plugins-1.4.5-patched/plugins/check_procs.c 2007-01-04 12:00:46.512560576 +0100
4@@ -181,6 +181,7 @@
5 strcpy (procprog, "");
6 asprintf (&procargs, "%s", "");
7
8+ pos = 0;
9 cols = sscanf (input_line, PS_FORMAT, PS_VARLIST);
10
11 /* Zombie processes do not give a procprog command */
12@@ -189,8 +190,12 @@
13 }
14 if ( cols >= expected_cols ) {
15 resultsum = 0;
16- asprintf (&procargs, "%s", input_line + pos);
17- strip (procargs);
18+ if (strstr(procstat, zombie)) {
19+ procargs = "";
20+ } else {
21+ asprintf (&procargs, "%s", input_line + pos);
22+ strip (procargs);
23+ }
24
25 /* Some ps return full pathname for command. This removes path */
26 procprog = base_name(procprog);