[Pkg-nagios-devel] Bug#530553: n-p-s: check_icmp wrong output in help

Justin T Pryzby justinpryzby at users.sourceforge.net
Mon May 25 17:35:09 UTC 2009


Package: nagios-plugins-basic
Version: 1.4.12-5
Tags: patch
File: ./check_icmp.c

Justification: At no point are warn.rta and crit.rta handled
differently.  The default behavior has a .5s timeout, not a 500s
timeout.  The range for pl seems to be 0..100, and not some orders of
magnitude otherwise.  All evidence indicates that the factor of 1000
was misplaced during some code change.

--- ./check_icmp.c
+++ /tmp/tmp.BWCqbw/check_icmp.c	2009-05-25 10:32:23.000000000 -0700
@@ -1271,10 +1271,10 @@
   printf ("    %s\n", _("specify a target"));
   printf (" %s\n", "-w");
   printf ("    %s", _("warning threshold (currently "));
-  printf ("%0.3fms,%u%%)\n", (float)warn.rta / 1000 , warn.pl / 1000);
+  printf ("%0.3fms,%u%%)\n", (float)warn.rta / 1000 , warn.pl);
   printf (" %s\n", "-c");
   printf ("    %s", _("critical threshold (currently "));
-  printf ("%0.3fms,%u%%)\n", (float)crit.rta, crit.pl);
+  printf ("%0.3fms,%u%%)\n", (float)crit.rta / 1000, crit.pl);
   printf (" %s\n", "-s");
   printf ("    %s\n", _("specify a source IP address or device name"));
   printf (" %s\n", "-n");






More information about the Pkg-nagios-devel mailing list