Skip to content

SNMP on the Tomato Router OS

So, I have a Linksys WRT54GL router, and I’m running the Tomato operating system on it. Tomato is brilliant; it looks nice, it’s easy to install and configure, and best of all it’ll run the router in Wireless Client mode. This turns the router into just another wireless client, connecting to my existing access point in the same way my laptop does - including using a lengthy password and WPA1 encryption. In my case the router then acts like a switch - forwarding traffic received on its wireless interface to the appropriate ports on its built-in four port switch. My other PCs, printers, XBox etc then plug into the router, and have seamless connectivity over wireless to the rest of my network. No driver issues, I don’t need to leave a PC on all the time, and only a single radio contending for the link (which allows better throughput). Brilliant.

There are, however, a couple of things Tomato doesn’t do; one of which is support SNMP - the Simple Network Management Protocol. SNMP is a standard way for devices to report statistics about their operation - CPU usage, memory usage, packets received and the like. You can then use a package like MRTG to collate that data from all of the devices in your network, and see what’s going on. In my day job, we use it to diagnose problems and to decide where best to spend our budget.

But back to Tomato… (Continued)

Percentages, and Percentage Difference / Increase / Decrease

Every couple of months, I get asked by management at work to produce a statistical report of what’s been going on in our team. How many times X occurred, how many times we had to Y etc.

It’s the least favourite part of my job.

The least favourite part of the least favourite part of my job is working out percentages, and percentage difference; mostly because I can never remember the formulae involved and thus much frantic Googling ensues. For future reference, here they are:

Percentages:
A percentage is a fraction, multiplied by one hundred. 1/2, or “one in two”, multiplied by one hundred gives us fifty; or “fifty percent”. 2/8, or “two parts in eight” multiplied by one hundred gives us twenty five; or “twenty five percent”.

If you have ten horses, and eight of the ten (”8/10″) are palominos, then:

8/10 * 100 =
80

…eighty percent are palominos.

Percentage Difference:
Sometimes you want to know how much a thing has increased, or decreased over time. The formula for this is (difference/original total) times one hundred. Say we get another shipment of horses; this time six out of the ten are palominos. The “difference” is two (six minus eight); and the “original total” is the eight palominos we had in the first batch. So:

((6-8)/8) * 100 =
(-2/8) * 100 = -25

…or this shipment is 25% lower in palominos than the last.

As an exercise for the reader, figure out the percentage of fat in full cream (nine grams per 250ml) and skim milk (0.25 grams per 250 ml); and the percentage difference between them.

Aussie Ubuntu MythTV Resources

A couple of people have asked for the web resources I used to build my MythTV box. Here are the main ones:

MythTV on Ubuntu:
http://parker1.co.uk/mythtv_ubuntu.php
This is a complete how-to on how to get MythTV set up on Ubuntu from scratch. It’s genius.
Mr Parker’s also built a net-booting EPIA MythTV front-end - i.e. no hard drives, and no CPU fan, to keep the noise down. When my XBox Mark One finally dies, this is what I’ll replace it with.

Ubuntu Guide:
http://ubuntuguide.org/wiki/Ubuntu_Feisty
Covers a large slice of things you will want to set up when you first install Ubuntu - handling RARs, wicked codecs like MP3 etc.
(Continued)

What’s the RDI of Rat Droppings?

From the U. S. Food and Drug Administration’s Food Defect Action Levels for Chocolate and Chocolate Liquor:

    Insect filth: (AOAC 965.38)

  • Average is 60 or more insect fragments per 100 grams when 6 100-gram subsamples are examined OR
  • Any 1 subsample contains 90 or more insect fragments

    Rodent filth: (AOAC 965.38)

  • Average is 1 or more rodent hairs per 100 grams in 6 100-gram subsamples examined OR
  • Any 1 subsample contains 3 or more rodent hairs

Mmmmm…. Chitinous goodness…. In other news, “Cochineal” is the Insect word for delicious….

Ekiga needs SRV records

I’ve been playing around with Trixbox (a VOIP PABX) and Ekiga (a VOIP soft phone). It worked (mostly), but Ekiga was taking forever to cause the other phone to ring. A little packet sniffing showed that Ekiga needs an SRV DNS record to help it find the SIP server. Since I’m running DNSMasq (a combined DNS/DHCP service) I just needed to add:

srv-host=_sip._udp.server.domain,server FQDN, 5060

…to my /etc/dnsmasq file, and it starts working in real time. I imagine if you were using a hardware IP Phone (Grandstream, etc) you’d have the same problem.

comp.basilisk FAQ

From the FAQ for the comp.basilisk newsgroup:

1. What is the purpose of this newsgroup?

To provide a forum for discussion of basilisk (BLIT) images. Newsnet readers who prefer low traffic should read comp.basilisk.moderated, which carries only high-priority warnings and identifications of new forms.

2. Can I post binary files here?

If you are capable of asking this question you MUST immediately read news.announce.newusers, where regular postings warn that binary and especially image files may emphatically not be posted to any newsgroup. Many countries impose a mandatory death penalty for such action.

More here.

Meaningful Filenames in MythTV

By default, MythTV creates odd filenames for the MPEGs it records. Garry Parker in his Ubuntu MythTV installation guide mentions a script called “mythlink” to create meaningful filenames (well, symbolic links) for your videos. Sadly, it’s b0rked in the current version of MythTV. I’ve hacked it about a bit, and come up with one that works, at least on my install. All praise to Dale Gass who wrote the original; I’ve just butchered his code a little.
(Continued)

MythTV on Ubuntu 7.04

I gave up on LinuxMCE. Seriously, I’ve tried the old Ubuntu 6.10 install (and had it fail to download packages), I’ve tried installing it from source (it tries to change directory to one that doesn’t exist), and I’ve tried the V1.1 Beta2 version (again, it fails downloading packages). Each time was on a fresh OS install, which doubles your installation time, and it doesn’t fully support my 64 bit processor. Enough, already.

So I tried building a straight Ubuntu 7.04 build using Garry Parker’s superb MythTV Ubuntu Installation Guide… and it worked. I had a couple of minor glitches - mostly trying to set up the Xbox MythTV front-end - but apart from that it was easy. Call it two hours work, but with much of that waiting for things to install, rather than actively working. I took a couple of notes on the issues I had to fix:
(Continued)

Interpol Notices

Interpol notices are divided into six different classes, and colour-coded accordingly; there’s an explanation of what each means here:
Interpol Notices

The Language of Cattle

From this page on Bovine Linguistics:

The Wisconsin-Holstein dialect appeared to have almost no grammar whatsoever. The article indicating negation (x’) is prepended to the word to be negated, and only negates that word. The verb rheh (to eat) is never used in context with meruuu (grass) - instead the words muum, xemmo, and hruunuuu are used. The words huuuhm, mo’, and xoomm are often not meant litterally, but are used in a derogatory manner.

Example Sentences
x’uuuh’rooh muuun meh You will not kiss me
huuuhm eh’meh My udder hurts
nuuux uuuh’hruun-nuum Sweet grass makes good milk
uuuh’hnuum uuuh’noono meh I laugh so hard I make butter
muumm-hren memooo-xox-mux Truly democratic elections are like passing a boulder