Skip to main content

Posts

Showing posts from November, 2007

Monitoring Hard Disks with SMART

I have quite a few hard disks running at all times. I came across this article this weekend and whipped up a little something to keep an eye on them. import subprocess import os disk_uuids = [entry.split()[0].split('=')[1] for entry in open('/etc/fstab') if entry.startswith('UUID=')] disk_devices = [] for uuid in disk_uuids: uuid_path = '/dev/disk/by-uuid/' + uuid try: dev = os.readlink(uuid_path) dev = os.path.join(os.path.dirname(uuid_path), dev) dev = os.path.abspath(dev) except OSError: print '%s does not exist.' % uuid_path continue disk_devices.append(dev) disk_health = {} for disk in disk_devices: p = subprocess.Popen(['smartctl', '-Hc', disk], stdout=subprocess.PIPE) for line in p.stdout.readlines(): if line.startswith('SMART overall-health self-assessment test result:'): health = line.split()[-1] disk_health[disk] = health break for disk, health
Read more

Internet Famous

Engadget OLPC XO and iRobot Create brought together for telepresence hack MAKE Roomba meets the XO-1 Gizmodo Hack Attack - XO Laptop Hacked to Remotely Run Roomba 'Round Rooms Ubergizmo XO laptop hacked Wired OLPC Telepresece Hack: One Robot Per Child Hackszine.com OLPC telepresence robot OLPC News Why OLPC's Give One Get One Will Sell Out Fast! Obviously I need to include a USB missile launcher just to appease the masses.
Read more

Nessie was revived in a day.

I decided to spend the day reviving project Nessie . I was pretty successful! I started from scratch with the goal of making Nessie's inner workings significantly simpler. Nessie now uses OpenDHT to bootstrap the service (see OpenHash vs. Your Mother ) and XML-RPC to communicate. Another simplification is that Nessie doesn't do any routing! All connections are direct connections over (eventually) SSL encrypted HTTP channels. It should be possible later to have nodes act as proxies to get around firewalls, but I'm in no hurry. To test the new system out, Nessie currently is capable of chat through a console interface (I exaggerate, it's really just a Python interpreter).
Read more

I've found a new beer condition.

I've made a lot of progress on Fido recently. It now docks (by piggybacking on the built in iRobot docking algorithm), manages charging the OLPC, has multi-day up times, and, most recently, dynamic sparkline representations of the sensor data on the web interface. What could I possibly do now? Everyone I ask says 'surveillance.' Simple surveillance is boring though. So, I'm going to kick it up a notch. My goal is to automatically generate one of these for each room in my apartment. Then, beer.
Read more

I am the pwnage.

Read more