From owner-freebsd-questions Fri Jan 28 17:58:13 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mx2.x-treme.gr (mx2.x-treme.gr [212.120.192.15]) by hub.freebsd.org (Postfix) with ESMTP id 0FD1814C2D for ; Fri, 28 Jan 2000 17:58:06 -0800 (PST) (envelope-from keramida@diogenis.ceid.upatras.gr) Received: from hades.hell.gr (pat25.x-treme.gr [212.120.197.217]) by mx2.x-treme.gr (8.9.3/8.9.3/IPNG-ADV-ANTISPAM-0.1) with ESMTP id DAA07139; Sat, 29 Jan 2000 03:57:36 +0200 Received: (from charon@localhost) by hades.hell.gr (8.9.3/8.9.3) id DAA20382; Sat, 29 Jan 2000 03:57:09 +0200 (EET) (envelope-from keramida@diogenis.ceid.upatras.gr) Date: Sat, 29 Jan 2000 03:57:09 +0200 From: Giorgos Keramidas To: Scott Gregory Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Detecting loss of Network Connection Message-ID: <20000129035709.A18572@hades.hell.gr> Reply-To: keramida@ceid.upatras.gr References: <389103E4.78D1E910@citizen.infi.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <389103E4.78D1E910@citizen.infi.net>; from bsdbox@citizen.infi.net on Thu, Jan 27, 2000 at 09:50:12PM -0500 X-PGP-Fingerprint: 62 45 D1 C9 26 F9 95 06 D6 21 2A C8 8C 16 C0 8E X-Phone-Number: +30-94-6203692, +30-93-2886457 X-Address: Theodorou Kirinaiou 61, 26334 Patra, Greece Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Jan 27, 2000 at 09:50:12PM -0500, Scott Gregory wrote: > To All, > > Are there any tools or utilities that I can use to detect when a network > connection has been lost? Do you mean like when an interface (tun? or ppp?) goes down? Since I'm not using user ppp anymore, I wrote a simple shell script that I call from my /etc/crontab to do this kind of stuff. The heart of it contains: ifconfig -au | grep ppp0 >/dev/null || { # the interface just went that way pppd call ISP } > Has anyone already created a tool that will do this? This solution > would have to be light on system resources since it would need to run > every couple seconds (at a maximum). Nah, running it so many times will probably make it a cpu hog. Try to fix the problem even deeper, where it's root may be hidden. -- Giorgos Keramidas, < keramida @ ceid . upatras . gr > "Don't let your schooling interfere with your education." [Mark Twain] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message