Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Apr 1998 15:09:00 -0700 (PDT)
From:      Doug White <dwhite@gdi.uoregon.edu>
To:        George Vagner <kf7nn@mutsgo.dyn.ml.org>
Cc:        questions@FreeBSD.ORG
Subject:   Re: bad modem on isp
Message-ID:  <Pine.BSF.3.96.980417150646.1625P-100000@gdi.uoregon.edu>
In-Reply-To: <199804171322.IAA02816@mutsgo.dyn.ml.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 17 Apr 1998, George Vagner wrote:

> i wrote to you a few days ago about losing connection 
> where i can ping anywhere but cant ftp,http,telnet etc
> anywhere. it happened again today so what i did
> was just disconnected my modem phone line until it lost carrier
> and the system redialed as uasual and all was great again.

Hm, ok.

> i have come to the conclusion that there may be a bad modem
> on my providers system and i just happen to dial into this
> modem once in a while and get stuck on it cause it dont hang up
> it just sits there where other modems hang up after a 
> random amount of time ~ 1 hour or so.

Odd.

> so here is what i want to do...
> 
> can you suggest a small program or script that i can enter
> into cron so it will request a http page or something
> and if it fails to return the page then hang up the modem
> and redial or kill ppp and restart it (same result)??

Sure, easy, you could use fetch to grab a web page and check it's return
code.  If it gets an error or times out it will probably return a code >0
(have to check the manpage).  So something like this:

#!/bin/sh

fetch http://your-isps-site.com/ || kill-ppp-command

> i am keeping a log of all the ip's i connect as so to
> inform the provider of the malfunctioning modem line.

The times are really important.  When you have a bank of 100 modems it's
virtually impossible to find bad modems without some seriously detailed
data.

Doug White                              | University of Oregon  
Internet:  dwhite@resnet.uoregon.edu    | Residence Networking Assistant
http://gladstone.uoregon.edu/~dwhite    | Computer Science Major



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980417150646.1625P-100000>