[Nagiosplug-devel] No performance data check_procs.c
matthias.flittner at nethinks.com
matthias.flittner at nethinks.com
Tue Dec 12 08:58:13 CET 2006
With this patch you get performance data. Could this patch please put into
the next nagios-plugins version?
Here is my patch:
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 */
Greets FliTTi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20061212/f91fcdbc/attachment.html>
More information about the Devel
mailing list