Geek In a Can

I took a two month sabbatical from work in the summer of 2006. After a few weeks of decompression, I got the urge to code, and thus was born Geek in a Can. I made some good progress, beefed up my Python skills, learned Django, and put out an "0.1" release. But by then I was back at work, and I came to realize that, much as I loved coding, 40 hours a week was enough to satisfy me. In any case, this project was really a couple years too late -- home broadband is pretty reliable these days, and there just isn't a pressing need for automated diagnostics like this any more.

The project is moribund, archived here for posterity.


Project hosting by

The Problem:

Mom's net connection is down. She picks up the phone and calls you. You walk her through the decision tree remotely. "Now type T-R-A-C-E-R-T space Y-A-H-O-O dot C-O-M." "Now look for the power cord on the back of the DSL modem. Yes, the grey box. The black wire." You hate life.

The Goal:

Mom clicks on a bookmark, and a local application runs through a series of simple tests (ping localhost, ping router, ping ISP gateway, etc.). It suggests a likely cause, and if applicable, displays instructions for fixing the problem (eg. power cycle cable modem).

Implementation:

A python daemon listening on a local port. It knows how to respond to a few simple URIs. Every hour or so it runs it's tests, and caches the results, the tests can also be run on-demand.

Do you want to get involved?

I'm looking for users, testers, contributors, and any other good ideas. Contact me at geek@geekinacan.net.

Status

Version 0.1 has 1800 non-commentary lines of code, including unit tests for most of the core modules. The web UI works (although it's ugly as sin), and you can browse and run tests on demand; tests can also be run from the command line. I'm developing on Linux, but it should run on OSX with some tweaking (I'll have to set up VmWare to try it on Win32).

The Config File

To give you an idea of how it works, here's what the config file currently looks like.
name = Test configuration
description = """Straw man config file for geek in a can"""

[sequence-1]
name = Connectivity
description = "Check basic network connectivity"
# TODO: Should we have a "next-sequence" or "on-success" key?

[[sanity test]]
test_type=ping
name=Sanity Test
description="""Make sure that local network is up."""
failure_action=DisplayMessage
failure_message="""Can't ping localhost.  You're hosed"""
[[[target-1]]]
host=127.0.0.1

[[local router]]
test_type=ping
name=Ping Local Router/NAT
description="""Is the Netgear box working?  If not, it's an easy fix."""
failure_action=DisplayMessage
failure_message="""Netgear down, please reboot it."""
[[[target-1]]]
host=192.168.0.1

[[first isp hop]]
test_type=ping
name=Ping First ISP Hop
description="""Check the first upstream ISP router.  If this is down, the problem
is out of our control."""
failure_action=DisplayMessage
failure_message="""Can't reach first ISP hop.  Go have a beer."""
[[[target-1]]]
host=12.34.56.78

[[external hosts]]
test_type=ping
name=Ping Stable External Host
description="""Check a few hosts out on the net.  If they are all unreachable,
it's likely that there are widespread problems."""
failure_action=DisplayMessage
failure_message="""External hosts unreachable.  Bad weather on the net."""
[[[target-1]]]
host=128.18.30.66 # ns.sri.com
[[[target-2]]]
host=216.239.32.10 # ns.google.com


[sequence-2]
name = Connection Quality
description = "Look for packet loss and high latency"

[[isp pkt loss]]
test_type=ping
name=Packet Loss In ISP Network
description="Is the ISP's network flaky?  If so, the whole net will seem slow."
failure_action=DisplayMessage
failure_message="""Packet loss in ISP network."""
[[[target-1]]]
host=68.87.198.129
no_pkt_loss=True
count=8

[[net pkt loss]]
test_type=ping
name=Packet Loss On the Net
description="Look for problems outside the ISP's immediate network."
failure_action=DisplayMessage
failure_message="""There's packet loss on the net."""
[[[target-all]]]
no_pkt_loss=True
count=8
[[[target-1]]]
host=128.18.30.66 # ns.sri.com
[[[target-2]]]
host=216.239.32.10 # ns.google.com

[[isp latency]]
test_type=ping
name=ISP Network Latency
description="See if packets are getting bogged down in the ISP's network."
failure_action=DisplayMessage
failure_message="""There's latency in ISP network."""
[[[target-1]]]
max_rtt=1000
host=68.87.198.129

[[net latency]]
test_type=ping
name=Latency On the Net
description="How's the weather out there?"
failure_action=DisplayMessage
failure_message="""There's latency on the net."""
[[[target-all]]]
max_rtt=1000
[[[target-1]]]
host=128.18.30.66 # ns.sri.com
[[[target-2]]]
host=216.239.32.10 # ns.google.com