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/430067-check_proc-perfdata.patch | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 web/attachments/430067-check_proc-perfdata.patch (limited to 'web/attachments/430067-check_proc-perfdata.patch') diff --git a/web/attachments/430067-check_proc-perfdata.patch b/web/attachments/430067-check_proc-perfdata.patch new file mode 100644 index 0000000..a7f409a --- /dev/null +++ b/web/attachments/430067-check_proc-perfdata.patch @@ -0,0 +1,47 @@ +--- nagios-plugins-1.4.15/plugins/check_procs.c 2010-07-27 22:47:16.000000000 +0200 ++++ /home/goesta/Projekte/Nagios/nagios-plugins_procs_perfpatch/plugins/check_procs.c 2009-12-19 01:12:49.924399127 +0100 +@@ -92,6 +92,7 @@ + char *fmt; + char *fails; + char tmp[MAX_INPUT_BUFFER]; ++int print_perfdata = 0; + + FILE *ps_input = NULL; + +@@ -293,6 +294,9 @@ + } + } + printf (ngettext ("%d process", "%d processes", (unsigned long) procs), procs); ++ if ( print_perfdata == 1 ) { ++ printf ("|procs=%d;%d;%d;0;", procs, wmax, cmax); ++ } + + if (strcmp(fmt,"") != 0) { + printf (_(" with %s"), fmt); +@@ -331,6 +335,7 @@ + {"pcpu", required_argument, 0, 'P'}, + {"elapsed", required_argument, 0, 'e'}, + {"argument-array", required_argument, 0, 'a'}, ++ {"perfdata", no_argument, 0, 'd'}, + {"help", no_argument, 0, 'h'}, + {"version", no_argument, 0, 'V'}, + {"verbose", no_argument, 0, 'v'}, +@@ -344,7 +349,7 @@ + strcpy (argv[c], "-t"); + + while (1) { +- c = getopt_long (argc, argv, "Vvht:c:w:p:s:u:C:a:z:r:m:P:", ++ c = getopt_long (argc, argv, "Vvhdt:c:w:p:s:u:C:a:z:r:m:P:", + longopts, &option); + + if (c == -1 || c == EOF) +@@ -505,6 +510,9 @@ + case CHAR_MAX+2: + input_filename = optarg; + break; ++ case 'd': ++ print_perfdata = 1; ++ break; + } + } + -- cgit v1.2.3-74-g34f1