How to know gateway status from the command line?
-
I have one of my providers' modem hang from time to time and this is observed as gateway down. I would like to trigger modem reset on such an event.
Can I determine the status of gateway from the command line in order to write appropriate script?
-
To reset the modem via software, the modem needs to be running to begin with, how are u going to do a reset in that situation? I have a theory repeat hardware freeze are often due to excessive heat.
-
What would you use to determine this? If the modem is simply failing to pass traffic, without killing the Ethernet connection, I doubt there'd be any status to check. What you could do is run a script that will ping your ISPs gateway and then act on failure. However, you'd still have no way to know if it's the modem or beyond that failed.
-
Gateway status is displayed on page
status_gateways.php
Offline gateways displayed red, and online gateways displayer green.
How to know color from the command line?