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/206987-check_procs.p1 | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 web/attachments/206987-check_procs.p1 (limited to 'web/attachments/206987-check_procs.p1') diff --git a/web/attachments/206987-check_procs.p1 b/web/attachments/206987-check_procs.p1 new file mode 100644 index 0000000..51070bc --- /dev/null +++ b/web/attachments/206987-check_procs.p1 @@ -0,0 +1,46 @@ +Index: check_procs.c +=================================================================== +--- check_procs.c (revision 1) ++++ check_procs.c (working copy) +@@ -303,7 +303,8 @@ + printf (_("%d crit, %d warn out of "), crit, warn); + } + } +- printf (ngettext ("%d process", "%d processes", (unsigned long) procs), procs); ++ ++ printf (ngettext ("%d process|processes=%d;;;0", "%d processes|processes=%d;;;0", (unsigned long) procs), procs, procs, procs); + + if (strcmp(fmt,"") != 0) { + printf (_(" with %s"), fmt); +@@ -437,8 +438,8 @@ + break; + else + prog = optarg; +- asprintf (&fmt, _("%s%scommand name '%s'"), (fmt ? fmt : ""), (options ? ", " : ""), +- prog); ++ asprintf (&fmt, _("%s%s"), (fmt ? fmt : ""), (options ? ", " : ""), ++ prog); + options |= PROG; + break; + case 'a': /* args (full path name with args) */ +@@ -447,7 +448,6 @@ + break; + else + args = optarg; +- asprintf (&fmt, "%s%sargs '%s'", (fmt ? fmt : ""), (options ? ", " : ""), args); + options |= ARGS; + break; + case 'r': /* RSS */ +Index: check_procs.c +=================================================================== +--- check_procs.c (revision 2) ++++ check_procs.c (working copy) +@@ -304,7 +304,7 @@ + } + } + +- printf (ngettext ("%d process|processes=%d;;;0", "%d processes|processes=%d;;;0", (unsigned long) procs), procs, procs, procs); ++ printf (ngettext ("%d process|processes=%d;;;0", "%d processes|processes=%d;%d;%d;0", (unsigned long) procs), procs, warn, crit, procs, procs); + + if (strcmp(fmt,"") != 0) { + printf (_(" with %s"), fmt); -- cgit v1.2.3-74-g34f1