I run a Ubuntu 12.04 apache web server from home as a hobby. My internet connection is flaky and sites often go offline. The server keeps running but is disconnected from the internet. Is there a way to find the amount of time server remained disconnected from the internet?
I'm looking for something that runs locally on the server (like a script) rather than a monitoring service that constantly pings my server to check status.