Backup up your brocade switch config

I wanted to backup a brocade san switch configuration, and tried SaveSimplyYourSan - but it wouldn't do ssh - and using telnet, uploading config to ftp - is too unsecure for my taste.

I ended up writing a small expect script that looks like this:

do you use sh or bash for scripts?

I've often heard people say that you should use #!/bin/sh in your shell scripts to ensure they run everywhere.

I always use /bin/bash - because I like the bash-specific features and wouldn't like to live without, and I don't have a list in hand that shows me which "features" I can't use if using /bin/sh - so I can't be sure my script actually works on generic /bin/sh - without testing.

Why I enjoy puppet

Having to configure 17 servers that have to be absolute alike and other such details, made me setup puppet to do the job. I've used cfengine before, so I was looking forward to using puppet for a larger project and see if it made me as happy as I'd hoped (compared to using cfengine which can be a bit tedious :)

The general goal is that everything is setup up by puppet, so that the restore plan is as simple as possible:

Nagios: checking for .lock files age

I wanted to check for age of certain .lock files from scripts, so I can catch if a certain script has been running for too long (or has died without removing the .lock file). In this instance it was a script that runs drupal cronjobs and to be sure that it doesn't run multiple times, the script throws a lock file while it is running.

It turns out that check_file_age in standard nagios-plugins worked beautifully, except for one little annoying detail - it returns CRITICAL if the file does not exist :(

san multipath on Ubuntu 8.04 - just don't

I have been working with a client on setting up multipath for some Linux database hosts, with a NetApp FC Backend. They wanted to use Ubuntu 8.04 and after mucking a bit with the official config from NetApp (had to change path_checker to directio as readsector0 does not work on Ubuntu, and disable priority check as this doesn't work either :( )

Ubuntu then saw the 4 paths, but as we soon discovered, it returned IO errors if just 1 path failed, which made the kernel remount read-only :(

1 way to do proper log monitoring

I am working on setting up a proper handling of logs from many hosts.

I want unexpected log entries from any host, to be noticed immediately (via an alert in Nagios) and I want the alert to go away, as soon as the log entry has been handled as needed (added to ignore filter, issue fixed, task assigned for later fixing etc.).

You suck

En sjælden gang imellem, får jeg (eller dvs. http://linuxpusher.dk ) en god morgen hilsen a la denne her:

From: Yora Shonk <ripoff@urstupid.com>
why are you selling software that is free,
you suck


Converting ogv to flv - high quality and small files?

I've been working on how best to convert our instructional videos for www.virkpaanettet.dk (CMS homepages) from the original ogv format to flv (flash) videoes to put on the site.

After having used ffmpeg, as many examples prescribe, I finally found an example, using mencoder which works a whole lot better than the ffmpeg versions I have tested.

I(or my wife) record using gtk-recordmydesktop in a 1024x768 resolution - as the website needs to be fully visible and most designs are optimized for that screen size.

er host programmet klytkode?

Jeg skulle lige checke om blog.kramse.dk har en IPv6 addresse (også kaldet en AAAA addresse i dns sprog).

Hvis jeg laver et host opslag (med bind9's version af host) på blog.kramse.dk's A addresse følger host programmet dennes CNAME entry til www.kramse.dk (uden at sige noget om det iøvrigt) og giver mig dens A.

hvad gør man med familie billeder og film?

Så har vi endelig fået styr på vores privat billeder igen.

Vi har et lager på en af vores servere, og der er de tilgængelige for familien vha. Apache Gallery.

Lokalt rsync'er vi så (jeg har lavet 2 scripts som konen også bruger) - således at vi altid har den seneste lokalt - før vi tilføjer/ændrer/flytter billeder/film.

På den måde har vi også en backup på serveren og lokalt på vores computere.