MDNS/Bonjour printer discovery script

Here’s a script I wrote whose purpose is to discover the printers that are currently being advertised by Bonjour on the network. The reason I wrote it was for a Nagios check that would in term verify that our printers were present. Writing it took me through the meanders of MDNS in Python & on Linux with multiple vlans. Let’s just say non-trivial.

Download

find_mdns_printers_1.0.tar.gz

Sample output

FreeBSD 9.0: higher MTU & NIC bonding

Here’s is some information that took me a good while to gather.

With the igb driver in FreeBSD, the mbuf cluster size needed is a mathematical formula involving the number of CPUs & the desired MTU. Unfortunately, it is currently hard set. On enterprise machines with many cores and higher MTUs, it is quite easy to reach this set limit. It will express itself with the following error message after an ifconfig:

igb0: Could not setup receive structures

This limit can be overridden with the following in /etc/sysctl.conf

kern.ipc.nmbclusters=131072
kern.ipc.nmbjumbo9=38400

These are the value that worked for 16 cores & an MTU of 9000.

While we’re at it, it took me a while to nail the exact syntax require for NIC bonding so here it is:

/etc/rc.conf

if_lagg_load="YES"
ifconfig_igb0="mtu 9000 UP"
ifconfig_igb1="mtu 9000 UP"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport igb0 laggport igb1 192.168.0.123 netmask 255.255.255.0"

As far as I can tell, capitalization matters…

Chicken Coop!

It’s been over a year since our move away from the city and we’re finally getting back into chickens. Things take time, starting fresh at the other end of the country doesn’t happen overnight. We only got 5 layers  as we’re pretty late in the season, we’ll start meat birds next spring.

The coop still needs some polish and a window but here it is in all its current glory:

With a bunch of Rhode-Island Reds

Works for toddlers as well

As with the beehive, I drafted everything on Google Sketchup and it made building it completely devoid of surprises. The plan can be downloaded here.