summaryrefslogtreecommitdiffstats
path: root/plugins-root
diff options
context:
space:
mode:
Diffstat (limited to 'plugins-root')
-rw-r--r--plugins-root/check_icmp.c80
1 files changed, 42 insertions, 38 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c
index c4f6739e..53017c81 100644
--- a/plugins-root/check_icmp.c
+++ b/plugins-root/check_icmp.c
@@ -1179,7 +1179,6 @@ icmp_checksum(unsigned short *p, int n)
1179 return cksum; 1179 return cksum;
1180} 1180}
1181 1181
1182/* make core plugin developers happy (silly, really) */
1183void 1182void
1184print_help(void) 1183print_help(void)
1185{ 1184{
@@ -1194,46 +1193,51 @@ print_help(void)
1194 print_usage (); 1193 print_usage ();
1195 1194
1196 printf (_(UT_HELP_VRSN)); 1195 printf (_(UT_HELP_VRSN));
1197
1198 printf("Where options are any combination of:\n"
1199 " * -H | --host specify a target\n"
1200 " * -w | --warn warning threshold (currently %0.3fms,%u%%)\n"
1201 " * -c | --crit critical threshold (currently %0.3fms,%u%%)\n"
1202 " * -n | --packets number of packets to send (currently %u)\n"
1203 " * -i | --interval max packet interval (currently %0.3fms)\n"
1204 " * -I | --hostint max target interval (currently %0.3fms)\n"
1205 " * -l | --ttl TTL on outgoing packets (currently %u)\n"
1206 " * -t | --timeout timeout value (seconds, currently %u)\n"
1207 " * -b | --bytes icmp packet size (currenly ignored)\n"
1208 " -v | --verbose verbosity++\n"
1209 " -h | --help this cruft\n",
1210 (float)warn.rta / 1000, warn.pl, (float)crit.rta / 1000, crit.pl,
1211 packets,
1212 (float)pkt_interval / 1000, (float)target_interval / 1000,
1213 ttl, timeout);
1214
1215 printf("\nThe -H switch is optional. Naming a host (or several) to check is not.\n\n"
1216 "Threshold format for -w and -c is 200.25,60% for 200.25 msec RTA and 60%\n"
1217 "packet loss. The default values should work well for most users.\n"
1218 "You can specify different RTA factors using the standardized abbreviations\n"
1219 "us (microseconds), ms (milliseconds, default) or just plain s for seconds.\n\n"
1220 "Threshold format for -d is warn,crit. 12,14 means WARNING if >= 12 hops\n"
1221 "are spent and CRITICAL if >= 14 hops are spent.\n"
1222 "NOTE: Some systems decrease TTL when forming ICMP_ECHOREPLY, others do not.\n\n"
1223 "The -v switch can be specified several times for increased verbosity.\n\n"
1224 "Long options are currently unsupported.\n\n"
1225 "Options marked with * require an argument\n");
1226
1227/* printf("The latest version of this plugin can be found at http://oss.op5.se/nagios\n"
1228 "or https://devel.op5.se/oss until the day it is included in the official\n"
1229 "plugin distribution.\n");
1230*/
1231 1196
1197 printf (" %s\n", "-H");
1198 printf (" %s\n", _("specify a target"));
1199 printf (" %s\n", "-w");
1200 printf (" %s", _("warning threshold (currently "));
1201 printf ("%0.3fms,%u%%)\n", (float)warn.rta / 1000 , warn.pl / 1000);
1202 printf (" %s\n", "-c");
1203 printf (" %s", _("critical threshold (currently "));
1204 printf ("%0.3fms,%u%%)\n", (float)crit.rta), crit.pl;
1205 printf (" %s\n", "-n");
1206 printf (" %s", _("number of packets to send (currently "));
1207 printf ("%u)\n",packets);
1208 printf (" %s\n", "-i");
1209 printf (" %s", _("max packet interval (currently "));
1210 printf ("%0.3fms)\n",(float)pkt_interval / 1000);
1211 printf (" %s\n", "-I");
1212 printf (" %s\n", _("max target interval (currently "));
1213 printf ("%0.3fms)\n", (float)target_interval / 1000);
1214 printf (" %s\n", "-l");
1215 printf (" %s\n", _("TTL on outgoing packets (currently "));
1216 printf ("%u)", ttl);
1217 printf (" %s\n", "-t");
1218 printf (" %s\n",_("timeout value (seconds, currently "));
1219 printf ("%u)\n", timeout);
1220 printf (" %s\n", "-b");
1221 printf (" %s\n", _("icmp packet size (currenly ignored)"));
1222 printf (" %s\n", "-v");
1223 printf (" %s\n", _("verbose"));
1224
1225 printf ("\n");
1226 printf ("%s\n\n", _("The -H switch is optional. Naming a host (or several) to check is not."));
1227 printf ("%s\n", _("Threshold format for -w and -c is 200.25,60% for 200.25 msec RTA and 60%"));
1228 printf ("%s\n", _("packet loss. The default values should work well for most users."));
1229 printf ("%s\n", _("You can specify different RTA factors using the standardized abbreviations"));
1230 printf ("%s\n\n", _("us (microseconds), ms (milliseconds, default) or just plain s for seconds."));
1231 printf ("%s\n", _("Threshold format for -d is warn,crit. 12,14 means WARNING if >= 12 hops"));
1232 printf ("%s\n", _("are spent and CRITICAL if >= 14 hops are spent."));
1233 printf ("%s\n\n", _("NOTE: Some systems decrease TTL when forming ICMP_ECHOREPLY, others do not."));
1234 printf ("%s\n\n", _("The -v switch can be specified several times for increased verbosity."));
1235 printf ("%s\n", _("Long options are currently unsupported."));
1236 printf ("%s\n", _("Options marked with * require an argument"));
1237
1232 printf (_(UT_SUPPORT)); 1238 printf (_(UT_SUPPORT));
1233 1239
1234 printf (_(UT_NOWARRANTY)); 1240 printf (_(UT_NOWARRANTY));
1235
1236// exit(3);
1237} 1241}
1238 1242
1239 1243
@@ -1242,5 +1246,5 @@ void
1242print_usage (void) 1246print_usage (void)
1243{ 1247{
1244 printf (_("Usage:")); 1248 printf (_("Usage:"));
1245 printf("Usage: %s [options] [-H] host1 host2 hostn\n\n", progname); 1249 printf("Usage: %s [options] [-H] host1 host2 hostn\n", progname);
1246} 1250}