Hi,

When we are monitoring a leased line and the traffic is running very high the router 
or the modem
drop the ICMP requests so the leased line apears to be down but it is still running. 
One solution is
maybe to use TCP Ping as an alternative to ICMP echo.

So I did my own patch to tranform fping.monitor to tping.monitor that interfaces tping.

You can find the source of tping at this address 
http://www.eecs.umich.edu/~azeitoun/tools.html


Is it possible to include the following patch or a derivate in the next release of Mon 
?


Best Regards,
Guy Baconniere

--
: Guy Baconni�re
: Team Developpement (DEVEL/GBA)
:
: www.deckpoint.ch
: Route de Chene 5 - 1207 Geneva - Switzerland
: Tel: (+41) 0844 81 15 15 - Fax: (+41) 0844 81 15 17
:
: Unlimited Internet


--- fping.monitor Mon Aug 27 20:22:45 2001
+++ tping.monitor Fri Oct 18 10:20:45 2002
@@ -1,12 +1,13 @@
 #!/usr/bin/perl
 #
-# Return a list of hosts which not reachable via ICMP echo
+# Return a list of hosts which not reachable via TCP ping
 #
-# Jim Trocki, [EMAIL PROTECTED]
+# Guy Baconni�re, [EMAIL PROTECTED]
 #
-# $Id: fping.monitor 1.7 Mon, 27 Aug 2001 14:22:45 -0400 trockij $
+# $Id: tping.monitor 0.1 Fri, 18 Oct 2002 10:20:45 +0100 baco $
 #
-#    Copyright (C) 1998, Jim Trocki
+#    Copyright (C) 2002, Deckpoint S.A. by Guy Baconni�re
+#    Based on fping.monitor 1.7 Copyright (C) 1998, Jim Trocki
 #
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
@@ -32,14 +33,16 @@
 sub usage
 {
     print <<EOF;
-usage: fping.monitor [-a] [-r num] [-s num] [-t num] [-T] host [host...]

-    -a only report failure if all hosts are unreachable
-    -r num retry "num" times for each host before reporting failure
-    -s num consider hosts which respond in over "num" msecs failures
-    -t num wait "num" msecs before sending retries
-    -T traceroute to each failed host. CAUTION: this may cause
-    this monitor to hang for a very long time
+Usage: tping [options] [targets...]
+
+   -a         show targets that are alive
+   -r n       number of retries (default 3)
+   -t n       timeout value in seconds (default 30)
+   -T         traceroute to each failed host. CAUTION: this may cause
+              this monitor to hang for a very long time
+
+   targets    list of targets to check (if no -f specified)

 EOF

@@ -48,9 +51,9 @@

 usage if ($opt{"h"});

-my $TIMEOUT = $opt{"t"} || 2000;
+my $TIMEOUT = $opt{"t"} || 2;
 my $RETRIES = $opt{"r"} || 3;
-my $CMD = "fping -e -r $RETRIES -t $TIMEOUT";
+my $CMD = "tping -i 25 -r $RETRIES -t $TIMEOUT";
 my $START_TIME = time;
 my $END_TIME;

@@ -72,7 +75,7 @@
     push (@unreachable, $1);
     }

-    elsif (/^(\S+) is alive \((\S+)/)
+    elsif (/^(\S+) :\[\d+\],  (\S+)/)
     {
  if ($opt{"s"} && $2 > $opt{"s"})
  {
@@ -85,15 +88,14 @@
  }
     }

-    elsif (/^(\S+)\s+address\s+not\s+found/)
+    elsif (/^Can't lookup host \[(\S+)\]/)
     {
     push @addr_not_found, $1;
  push @unreachable, $1;
     }
-
     else
     {
-    print STDERR "unidentified output from fping: [$_]\n";
+    print STDERR "unidentified output from tping: [$_]\n";
     }
 }

@@ -105,13 +107,13 @@

 if ($retval == 3)
 {
-    print "fping: invalid cmdline arguments [$CMD @ARGV]\n";
+    print "tping: invalid cmdline arguments [$CMD @ARGV]\n";
     exit 1;
 }

 elsif ($retval == 4)
 {
-    print "fping: system call failure\n";
+    print "tping: system call failure\n";
     exit 1;
 }


_______________________________________________
mon mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to