Remote fencing with an APC Masterswitch Plus (with an AP9606)

June 28th, 2009

Photo: APC Masterswitch Plus (with an AP9606)

As I mentioned before, I’ve been fencing most of my home/office systems (and even lights) these days. The problem is that cheaper power switches like the IP Power 9258 can be damaged quite easily. Two of mine have failed under a particular load element and I’m not saying in that case that it’s not my fault (I still like those units), but it’s clear that having something more “household name” can be a good idea. So I looked on ebay and discovered that old APC Masterswitches now often go for similar money to other more expensive kit.

I bought an 8-port Masterswitch Plus (with an AP9606) this week. Previously these went for up to $1000, but can now be had for even a tenth of that much. And they do telnet/SNMP (and ssh, if you upgrade them - not so much of a concern in this particular out-of-band configuration). I looked around for fencing scripts and obviously found the Red Hat Cluster Suite fence_apc stuff but I don’t want to install lots of stuff, and I don’t want to talk over telnet if I’ve got a private SNMP community configured and am reasonably comfortable with that. So I updated my previous script to talk to APC Masterswitch units.

APC Masterswitch Plus (with an AP9606) fencing script.

Jon.

ZNC awayping plugin (now with improved “antiping”)

June 22nd, 2009

Code: http://jonmasters.org/pub/util/awayping/awayping.txt

Do you constantly get harassed on IRC with “ping?” (insert no context whatsoever here), of course you do. And then you come back later with a bunch of “ping” and no idea what the person wanted.

For those who just bought a computer ten minutes ago (I know there are still a few people out there), here’s an example of fail:

<someone> jonmasters: ping

That is utterly useless. It results in a ping/pong/ping cycle that can go on at some length, and then probably an accompanying email cycle, and maybe worse. Multiply that by a half dozen-dozen different pings and you’ve wasted a fair chunk of time just to find out what someone wants - and have no ability to prioritize or even know if the issue is still even an issue when you read a ping even a few minutes later. Here’s an example of non-fail:

<someone> jonmasters: some useful contextual message here?

I know many of you gave up even listening to these contextless “ping” messages years ago (because we’ve spoken about it at some length), or you don’t bother to leave anything connected to IRC if you’re not in front of it, or you just don’t care (hoping that people will learn how to use a computer and try again). But in case you still do care, I would like to share a plugin I wrote for ZNC called “awayping”. Away ping texts (a single line), emails you (full IRC transcripts), and tweets you (by private message) when you are detached or after a configurable idle period. It’s better than simply “autoaway”.

Awayping is getting slightly more clever over time, and the new “antiping” feature enhances awayping by also politely educating those who “ping” you (by private message) that leaving a message is infinitely more helpful later than simply 5 “ping”s on the screen. It might also encourage a few people to consider that they could send you email instead.

Here’s an example “antiping” reply:

<jonmasters> *********************************************************
<jonmasters> *** This user is marked as busy. A text message just  ***
<jonmasters> *** got sent with your 'ping'. But 'ping' alone isn't ***
<jonmasters> *** useful in a text/log message. Can you let me know ***
<jonmasters> *** what your ping was about? Your reply will be sent ***
<jonmasters> *** along so I can respond appropriately upon return. ***
<jonmasters> *********************************************************

With “awayping”, you can get email or text alerts of pending “ping” messages, and encourage people to use the internet responsibly, so you don’t have to constantly check IRC and can do something more useful instead. Because, let’s face it, they’re just going to email you anyway.

Jon.

Announcing kernelpodcast.org

June 16th, 2009

I recently registered and setup kernelpodcast.org, where you can find links to the RSS feeds (podcast, and the transcripts), comment, and a lot more besides.

Jon.

Massachusetts Driving Laws

May 17th, 2009

So, I should warn you ahead of time. This is a rant.

Yesterday, it was sunny afternoon, so I decided to go out to the store and pick up a few items. The evening before, I had parked my car on the street (for which I have a valid, official Cambridge City permit to do so) but I now decided to park it back at my apartment for a few minutes in order to empty the trunk of some trash, and so forth. The car was parked opposite my apartment building, on the opposite side of the road, about 10 yards from the parking lot. I started the engine, signalled and turned out, crossed the central yellow line as if almost making a U-turn and then turned into my apartment parking lot.

That would be the precise moment when an apparently off-duty Cambridge cop was out walking with his kid and witnessed my (apparently) “heinous” activity of turning my car into the parking lot. I heard a voice say “stop right there”, and a badge flash, and wondered what the heck I could have done wrong. The guy said something like “you know you can’t cross the yellow line”, but only after barking at me for a while. He threatened to call his buddies and have them come give me a ticket if I didn’t go back out and drive down the road and around the block and “do it again”. Since I was in a rush, caught off guard, and couldn’t be entirely sure I wasn’t being singled out for being made an “example” of, I decided the easiest thing was to comply and get away from the guy. That took 10 minutes, because going around the block takes you onto one way streets and several traffic systems that force an (involved) detour.

Now, I could at this point make jokes about doughnuts, or suggest that there are bigger fish to fry than some guy who *might* be violating some parking regulation on a Saturday afternoon. But I also *knew* that I wasn’t violating the law. I know this, because I read the Massachusetts General Laws when I’m bored or just because I’m inclined to do that kind of thing - I especially read certain parts of the traffic code when I went to traffic court earlier this year to successfully contest a citation. I’m talking about Chapter 89 of the Mass. General Laws, which define standard driving practice. They not only specifically do NOT exclude one from making a legal U-turn in the road under certain conditions, but also specifically DO cover the case of allowing one to cross a central dividing line in order to turn into a “private way”. Those regulations allow cities such as the City of Cambridge to enact certain rules, such as those codified into the City of Cambridge Traffic and Parking Regulations.

Article IV of those regulations, entitled “Turning Movements”, clearly states that:

“The driver of any vehicle shall not turn such vehicle so as to proceed in the opposite direction upon any street in a business district and shall not upon any other street so turn a vehicle unless such movement can be made in safety and without interfering with other traffic”.

Well, according the latest official City of Cambridge Zoning Map, I live in a C-1 district, which means “Residence C-1″ - that is to say I do not live nor had parked my car in a business district and thus was not subject to the limitation on turning my car at the time. The road was also clear of traffic at the time, and was not on a hill or otherwise subject to obstructions prohibiting an entirely legal “U-turn” (even though that’s not exactly what I was doing - I merely made most of a U-turn as I pulled into the private way where I live). I was therefore not in violation of either Chapter 89 of the Massachusetts General Laws, or of the City of Cambridge Traffic and Parking Regulations at the time. Whatever law this guy thought he might have known, I have no idea. And, having checked it, I’m certain he was incorrect.

What I did yesterday in moving my car 10 yards on a public right of way was completely legal under the laws of Massachusetts, and also under the laws of anyone’s common sense, as I have now proven to myself by checking the regulations. I wanted to do this first, just in case this guy decides to harass me in future - in which case I will file a complaint with the Cambridge Police Review and Advisory Board. I suggest they consider advising their officers to go out and enforce the law, not annoy the local residents going about their lawful business on a Saturday afternoon.

Jon.

Linux Kernel Podcast

May 4th, 2009

So I’ll freely admit, I’m obsessed with Podcasts. I love listening to news - the New York Times Front Page, Wall St. Journal Today, NPR News, APM’s Marketplace, On Point, etc. I particularly like those Podcasts that provide a quick summary of what’s going on, since we don’t all have time to be subject experts on everything in life.

I recently pondered whether it would be useful to have a similar podcast for the Linux Kernel Mailing List. I was actually pretty surprised at the lack of existing podcasts (other than the excellent one from TimeSys), especially considering folks are often travelling and away from email - and then there are many people who are interested but don’t have a reason to follow the list so closely. Since I do already read the list, I decided it wouldn’t be much additional effort to make a quick recording based on what I had read that day. Look upon this as an experiment to gauge interest - and to see if there are enough volunteers to help make this a regular thing.

Today’s episode took 15 minutes to prepare and record, and 1 hour to get staged and setup with the right XML, etc. That’s hopefully 15-20 minutes per day on an ongoing basis, which isn’t much, and might help someone. I would especially like it if there were enough people who were interested in helping out that we could farm this out between a few of us on a weekly basis - but that’s predicated on this being useful. I’ll watch the logs, listen for feedback, and this will last as long as it provides something useful to the wider community.

Linux Kernel Podcast

Remote fencing with the IP Power 9258

May 1st, 2009

Photo: IP Power 9258

A little while ago, I picked up one of these units on eBay for around $125USD. I needed something that was slightly cheaper than the regular range of higher-end APC Masterswitch and had heard that this was an embedded Linux device. It is (though that doesn’t excuse the horrific web UI). This afternoon, I setup a new Real Time kernel test box and decided to get the fencing done right this time around - so I wrote a simple script. It allows one to do a few simple things: power on, power off, and report status:

[jcm@perihelion ~]$ ippower
Usage: ippower <status> | <target> <command>

TARGETS: perihelion apohelion power5 light
COMMANDS: on off status

[jcm@perihelion ~]$ ippower status
perihelion: on
apohelion: off
power5: off
light: off
[jcm@perihelion ~]$ ippower apohelion on
on
[jcm@perihelion ~]$ ippower apohelion on
unchanged
[jcm@perihelion ~]$ ippower apohelion off
off
[jcm@perihelion ~]$ ippower status
perihelion: on
apohelion: off
power5: off
light: off

You can download my ippower fencing script if you would like to use it with a similar device.

HOWTO: Drive a convertible in a New England snow storm

December 22nd, 2008

So, it’s been a year since I wrote what is now part one of this HOWTO guide. I was a little younger and somewhat more naive about New England winter driving at that point, which means it’s now addendum time.

Required items:

* Blizzak LM-25 High Performance Sports Car Winter Tires
* Face mask
* Gloves (Summit Ascent)
* Mountaineering jacket
* Shovel (plastic)
* Yaktrax


Photo: Blizzak LM-25 High Performance Sports Car Winter Tires

The first thing you need to know about New England weather (in winter especially) is that it can really suck big donkey balls. Unlike the near perfection that is California, it’s quite common to have huge snowstorms that begin as regular storms sweeping across the country (or up the Eastern coast - colloquially referred to as a “nor’ easter”) and wind up dumping snow as they reach the North East and mix with our air fronts. Using the latest storm as an example, we had around 14 inches of snow dumped on us over this weekend - most of which came on Friday, but rounds two (and even three) are underway at the moment.


Photo: empeg Linux car stereo system

At times such as these, the Cities of Boston, Cambridge, and their dependents (Somerville, Medford, Brookline, etc.) will declare a “snow emergency” - as witnessed by the emergency blue beacons that will flash all around town. Snow plows are dispatched in earnest, and an entire industry specializing in snow dispersal is activated. These guys are highly efficient, as is the city in towing your car if you leave it in their way (don’t park on any street with those red “snow emergency” signs erected). At times such as these the parking in various public places becomes free - for example, Cambridgeside Galleria Mall - in case you get stuck.


Photo: Trixie the MX5 covered in snow

This time last year, I had the somewhat foolish notion that I might be able to drive at this time. How bad could it really be, I pondered? I quickly discovered that low profile summer sport tires aren’t such a good idea. I was able to get out of the parking lot (just) but wasn’t able to go more than a block without having to turn around. I think I said many things about New England weather that can’t be repeated in polite company, but suffice it to say I was pretty miserable without my car for much of the winter snow. On the days when it didn’t snow and I did venture out, I was able to experience such joys as getting stuck on ice.

Since last year, I’ve learned a few things. One of the first purchases of the season was a complete set of Blizzak LM-25s, mounted on a second set of smaller rims (affording greater contact with the snow than the low-profile variants). These are seriously high performance snow tires (the best on the market), of the kind you need if you’re going to try driving a rear-wheel drive lightweight sports car on a weekend such as this. I stayed in on Friday during the main snowstorm, but decided to venture out on Saturday for a test drive. I really am that annoyed at the weather here that something had to be done about it this year.


Photo: Trixie the MX5 after de-snowing

Despite (or one might rather say, in spite of) the snow, I was able to drive around without much interruption, and without skidding and sliding everywhere - the same cannot be said of other vehicles on the road (of which I was the smallest, by a fairly sizable margin) - and nearly made it to Ikea before we decided we weren’t really all that desperate to get there. Today, I drove all over town - between the snow plows - getting coffee, picking up a few things, ferrying others around, and for a good workout. I seem to be able to cope with up to 2-3 inches of snow without a big problem, and my car can tolerate several inches more before requiring a little more effort - this is mainly an issue entering/exiting driveways.


Photo: Yaktrax Professionals installed on older shoes

The snow is annoying, but so is being cold. For that, I strongly recommend mountaineering equipment (I’m a delicate flower when I’m going out in search of coffee). I generally wear the kind of gloves and face mask that you’d wear climbing Mt. Washington when shoveling snow out of the parking lot (recommendation: use plastic shovels, not metal ones - you think it’s environmentally better, but unfortunately they break. Live with the oil use). I also have taken to wearing Yaktrax Professionals that I’ve semi-permanently fitted to an older pair of shoes. These are essentially chains for your shoes, and they allow me to run in snow without fear of slipping and skidding. Definitely come in recommended and can be worn while driving. (ab)using old shoes and keeping another (identical) pair in the trunk to change into if absolutely necessary prevents the annoyance of repeated removal/re-application. You just have to careful not to slip indoors.

In summary, fuck the New England winter. Fuck it very very hard. While I eagerly await spring, I shall continue to stick my non-frozen fingers up at this weather. Oh dearest California (San Francisco especially), I miss you so very much. I look forward to seeing you again soon, and enjoying your golden glow.

Jon.