Date: Sat, 01 Dec 2007 17:44:04 +0100 From: Andy Rozman <andy@triera.net> To: freebsd-hackers@freebsd.org Subject: freebsd network problem and restarts Message-ID: <47518F54.9040000@triera.net>
next in thread | raw e-mail | index | archive | help
Hi ! Lately after install of new hardware, I upgraded to FreeBSD 7.0 AMD64. Problem is that every few days (5 or so) computer network connection is lost, if I restart computer everything is OK again.... What I need is script that will determine if connection is valid and if not restarting the machine. I plan to run this script by cron every hour... I am very lousy with writing scripts of anykind, so I would need little help from you... Script must do following things: 1. Check if connection is alive by pinging one site, www.google.com should be good example 2a) If connection is ok, script is finished 2b) There is no response following stuff must happen: a.) Wait for 10 minutes (or some specified time) and try step 1 again if fails following thing are done b.) Write line into log that connection is failed c.) Inject mail message to local sendmail instance (so that mail is sent after restart) d.) Reboot computer If someone knows about script that does this things, I would be very thankful if he/she could help me. If not I would be thankful for any help in creating such script. Thank you in advance. Andy
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47518F54.9040000>