Voila en gros ce que fait le mien:
Je regarde si le nbr de paquets entrants a augment�. Si oui, alors tout
baigne. Si non, je recupere l'adresse du peer pour le pinger.
Si le ping marche alors OK.
Sinon, j'incremente un compteur de probleme ping
Si le compteur atteint 5 ping infructeurx -> redemarrage de pppd.
Si le redemarrage de pppd ne suffit pas, je le redemarre encore en
augmentant ce fameux delai (20 secondes + tentative*10). Si au bout de 5
redemarrages de pppd, toujours rien, je redemarre tout depuis l'USB
(rmmod et tout le bazarre...)
Et la si ca marche pas -> 1013 ;)
Quand je redemarre pppd, je relance snort, et d'autres trucs
(dyndns,....)
Voila un bout de log:
Starting to monitor ppp0 link
Sat Jun 23 11:55:09 2001: PEER 217.128.202.1 is alive
Sat Jun 23 11:55:09 2001: SLEEP for 60 seconds
Sat Jun 23 11:56:10 2001: PPP0 traffic increased to 1128 packets.
Skipping ping
Sat Jun 23 11:56:10 2001: SLEEP for 30 seconds
Sat Jun 23 11:56:41 2001: PPP0 traffic increased to 1534 packets.
Skipping ping
Sat Jun 23 11:56:41 2001: SLEEP for 30 seconds
Sat Jun 23 11:57:11 2001: PPP0 traffic increased to 1923 packets.
Skipping ping
Sat Jun 23 11:57:11 2001: SLEEP for 30 seconds
Sat Jun 23 11:57:42 2001: PPP0 traffic increased to 2318 packets.
Skipping ping
Sat Jun 23 11:57:42 2001: SLEEP for 30 seconds
Sat Jun 23 11:58:13 2001: PPP0 traffic increased to 2707 packets.
Skipping ping
Sat Jun 23 11:58:13 2001: SLEEP for 30 seconds
......
Sat Jun 23 12:14:33 2001: PEER 217.128.202.1 is down (1 time(s))
Sat Jun 23 12:14:33 2001: SLEEP for 5 seconds
Sat Jun 23 12:14:39 2001: PEER 217.128.202.1 is down (2 time(s))
Sat Jun 23 12:14:39 2001: SLEEP for 5 seconds
Sat Jun 23 12:14:46 2001: PEER 217.128.202.1 is down (3 time(s))
Sat Jun 23 12:14:46 2001: SLEEP for 5 seconds
Sat Jun 23 12:14:52 2001: PEER 217.128.202.1 is down (4 time(s))
Sat Jun 23 12:14:52 2001: SLEEP for 5 seconds
Sat Jun 23 12:14:59 2001: PEER 217.128.202.1 is down (5 time(s))
Sat Jun 23 12:14:59 2001: PPPD is being restarted (peer unreacheable)
...
Sat Jun 23 14:10:54 2001: PPP0 traffic increased to 22903 packets.
Skipping ping
Sat Jun 23 14:10:54 2001: SLEEP for 30 seconds
Sat Jun 23 14:11:26 2001: PEER 217.128.202.1 is down (1 time(s))
Sat Jun 23 14:11:26 2001: SLEEP for 5 seconds
Sat Jun 23 14:11:31 2001: PEER 217.128.202.1 is alive
....
Si certains veulent le script, pas de problemes....
Olivier Demah a �crit :
>
> Le Vendredi 24 Ao�t 2001 14:53, vous avez �crit :Sat Jun 23 12:14:01 2001: PPP0
>traffic increased to 15978 packets. Skipping pingSat Jun 23 12:14:01 2001: SLEEP for
>30 seconds
Sat Jun 23 12:14:33 2001: PEER 217.128.202.1 is down (1 time(s))
Sat Jun 23 12:14:33 2001: SLEEP for 5 seconds
Sat Jun 23 12:14:39 2001: PEER 217.128.202.1 is down (2 time(s))
Sat Jun 23 12:14:39 2001: SLEEP for 5 seconds
Sat Jun 23 12:14:46 2001: PEER 217.128.202.1 is down (3 time(s))
Sat Jun 23 12:14:46 2001: SLEEP for 5 seconds
Sat Jun 23 12:14:52 2001: PEER 217.128.202.1 is down (4 time(s))
Sat Jun 23 12:14:52 2001: SLEEP for 5 seconds
Sat Jun 23 12:14:59 2001: PEER 217.128.202.1 is down (5 time(s))
Sat Jun 23 12:14:59 2001: PPPD is being restarted (peer unreacheable)
> > Bonjour,
> >
> > J'ai un script perl qui fait a peu pres la meme chose (gestion du nombre
> > d'echecs
> > en plus,.....) et j'ai eu le meme probleme. Ton script, il se lance a
> > quel
> > intervalle ? Si pppd n'a pas assez de temps pour initialiser la
> > connection, alors
> > ton script va le retuer avant qu'il ai le temps de finir. A verifier.
> j'y ai song�; le timing va etre compliqu� � trouver; toute id�e est la bien
> venue .
> oliv'
> >
> > Vincent
> > PS:d�sol� pour les mails pr�cedent....
> le script se lance toutes les 2minutes
>
> ps: linux GNU/debian 2.2 (potato) kernel 2.4.5
>
> --
> Membre Fondateur de Phpfr : http://www.phpfr.org
> Membre de l'Association Gcu Squad : http://www.gcu-squad.org
> Membre du R�seaux Unixlibres : http://www.unixlibres.net
>
> Liste de diffusion modem ALCATEL SpeedTouch USB
> Pour se d�sinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe
>
>
--
\|||/
(o o)
_____________oo0__(_)__0oo_________________
Vincent Thinselin
mail: [EMAIL PROTECTED]
-------------------------------------------
Liste de diffusion modem ALCATEL SpeedTouch USB
Pour se d�sinscrire : mailto:[EMAIL PROTECTED]?subject=unsubscribe