Let's auto-reboot my tiresome connection!
November 17, 2010 5:28 PM   Subscribe

Can I force my Windows XP PC to restart whenever my internet traffic ceases?

Lately, my computer has taken to disconnecting my broadband connection without warning; and since I usually leave internet-using programs running for long periods of time, I return to a screen-full of error messages or requests to connect, which are probably annoying my sys-admin no end.

Simply put, when the connection cuts off, the "Local Area Connection" is still superficially present, but no traffic goes in or out. I'm forced to reboot in order to use anything Net related.

I'm looking for a permanent solution to this problem. In the mean-time, is there a way for my PC to detect whenever internet traffic has stopped/disconnected and automatically reboot? It'd save me a LOT of time, but my scouring the Net has led to nothing; only timed shutdown commands and program crash monitors. Does the concept I describe exist?
posted by malusmoriendumest to Computers & Internet (12 answers total)
 
I'm looking for a permanent solution to this problem.

Wipe the hard drive clean and reinstall the OS.
posted by Blazecock Pileon at 5:40 PM on November 17, 2010 [1 favorite]


Best answer: To qualify that last statement, your computer should not be disconnecting your broadband connection. The only reason I can think that would be happening is if your Windows computer is infected with malware or is otherwise a bot, eating up bandwidth like a pig, and the ISP is cutting you off. So a clean slate will at least help you troubleshoot the problem and isolate it to some other cause, if it's not your computer.
posted by Blazecock Pileon at 5:46 PM on November 17, 2010


There's lots of things that could be wrong. Malware and viruses, bad Apple software, bad drivers, bad NIC, bad cabling, bad router, bad external wiring, bad ISP. There are a few others, but you get the idea - it can be a number of things. Start with the simple and easy and work from there.

You could write a powershell script to reboot the machine everytime it fails a ping to a given host. Otherwise, I dont know of any out of the box program that would do that.
posted by Pogo_Fuzzybutt at 5:59 PM on November 17, 2010


When it does this, can you even ping the router/modem?

Try to find new drivers (post what NIC it is here in the thread if you would like assistance), maybe a new NIC. I'd doubt it's cable because all you do is reboot the PC.

Malware possibly? Run MalwareBytes (or the whole of my profile).

Anything else?
posted by deezil at 6:07 PM on November 17, 2010


Best answer: I'm a network technician. I don't know how, outside of writing a custom script, to make a computer reboot itself under a no-connectivity event. What you really need is to find out why your connection is dropping.

Here are typical reasons and solutions:

1. Your gateway device (DSL modem, etc.) is renegotiating its IP address. This happens to certain types of devices once every 24 hours. If this is the case, there's nothing you can do about it but a work-around is to purchase a static IP address or switch to a different connection type.
2. Your connection is dropping due to an intermittent physical issue with the line. This would have to be troubleshot by a technician; you'd have to call your ISP and get them to send someone out.
3. Your connection is dropping due to traffic congestion. This is typical on over-sold shared connections, like cable. You probably can't do anything about it other than switch to another connection type.
4. As Blazecock Pilon said, it could be that your machine is infested with malware that's using up your bandwidth so badly that real programs can't use the connection.
5. Maybe your ISP is throttling your connection. Solution is to call them and ask; they may reveal to you that your machine is infested.
6. There's something wrong with your TCP/IP protocol stack: this is unlikely, but not impossible. Solution is to reinstall the protocols; easiest way to do that is to reinstall your opsys from scratch.
7. You have satellite or fixed wireless and the dish needs to be realigned. Call your provider for a truckroll.
8. Your connection is fine but Windows is halting. Solution is to have a tech look at it or reinstall Windows.
9. Your computer is experiencing some form of hardware failure, perhaps in RAM or your NIC or wireless card or something. Solution is to identify and replace the failing hardware.
10. Your gateway device is faulty or failing and needs to be replaced.

Best of luck.
posted by goblinbox at 6:11 PM on November 17, 2010 [3 favorites]


Response by poster: I'm beginning to think it might be the sysadmin or some automated network process; the connection only seems to vanish when I'm playing an online game, using a P2P program, or doing something similarly bandwidth-hungry. Guess I'll have to talk to them about it- thanks for the help in the meantime.
posted by malusmoriendumest at 6:30 PM on November 17, 2010


Could also be your security suite, especially if that happens to be one of the Norton family. I've seen that thing bugger up more LAN connections than I can count.

When the connection goes down, does Windows tell you that it has "limited or no connectivity"? And if so, does right-clicking on the Local Area Connection icon and choosing "Repair" work?
posted by flabdablet at 6:37 PM on November 17, 2010 [1 favorite]


Many ISPs assign low priority to certain types of packets, so you might have a lot of packet loss/latency for those programs, yes, but your entire connection shouldn't drop.

There's a difference between latency - a condition in which very little traffic gets through - and your connection going away altogether. Are you certain which condition is happening?

Have you run any tests to see what kind of throughput/goodput you're actually getting? How fast is your connection supposed to be? Are you on a shared connection (i.e. is someone else using your bandwidth)?
posted by goblinbox at 6:55 PM on November 17, 2010


Pingplotter isn't free, but it is really, really handy for this kind of thing.

For a general connection issue like this, set it up to ping one of your DNS's every ten seconds.

"... the connection only seems to vanish when I'm playing an online game, using a P2P program, or doing something similarly bandwidth-hungry."

That sounds a hell of a lot like ISP traffic shaping, though they usually throttle the connection rather than cut it off entirely.
posted by Chocolate Pickle at 7:07 PM on November 17, 2010


Actually, I didn't realize that there is a freeware version of pingplotter.
posted by Chocolate Pickle at 7:09 PM on November 17, 2010


Best answer: If you open up notepad and put in:

-------------------

@echo off

set /a counter=0

:start

ping google.com > %temp%\pinglog.txt

find "Reply from" < %TEMP%\pinglog.txt > nul

if errorlevel 1 (set /a counter=%counter%+1)

if not errorlevel 1 (set /a counter=0)

set /a timeout = 20 - %counter%

if %counter% GEQ 4 (echo System reboot imminent, please press ctrl-c in the next %timeout% seconds to abort)

if %counter% GEQ 20 (shutdown -r)

goto :start

-----------------

and then save and rename it with the .bat file extension and stuff it into the startup folder you should be all set. You can change the threshold from 20 timeouts to whatever you think is necessary (change both instances of 20) and google.com could be changed to whatever IP you like.

I'm running XP, but hopefully it works for other Windows OSes too.
posted by GooseOnTheLoose at 10:52 PM on November 17, 2010 [2 favorites]


Have you checked the system event log in My Computer=>Manage? There'll probably be something in there about 'could not restart service' or 'service stopping due to ...'. Event log is my first port of call for diagnosing weird computer things.
posted by Sebmojo at 5:18 PM on November 18, 2010


« Older Can you help me make Dan Hesse's life hell?   |   Mandarin Chinese class in New York City? Newer »
This thread is closed to new comments.