summaryrefslogtreecommitdiffstats
path: root/web/attachments/171745-nagios-plugins-1.4.2-check_procs_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/171745-nagios-plugins-1.4.2-check_procs_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/171745-nagios-plugins-1.4.2-check_procs_zombies.patch')
-rw-r--r--web/attachments/171745-nagios-plugins-1.4.2-check_procs_zombies.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/web/attachments/171745-nagios-plugins-1.4.2-check_procs_zombies.patch b/web/attachments/171745-nagios-plugins-1.4.2-check_procs_zombies.patch
new file mode 100644
index 0000000..3ba88bf
--- /dev/null
+++ b/web/attachments/171745-nagios-plugins-1.4.2-check_procs_zombies.patch
@@ -0,0 +1,26 @@
1diff -Naur nagios-plugins-1.4.2/plugins/check_procs.c nagios-plugins-1.4.2-check_proc_zombies/plugins/check_procs.c
2--- nagios-plugins-1.4.2/plugins/check_procs.c 2005-09-15 10:27:58.000000000 +0200
3+++ nagios-plugins-1.4.2-check_proc_zombies/plugins/check_procs.c 2006-03-21 20:22:50.883708900 +0100
4@@ -166,6 +166,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@@ -174,8 +175,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 #ifdef HAVE_BASENAME