Monthly Archives: June 2012

ITIL v3 Foundation certified

Today I was informed that I have passed the ITIL v3 Foundation exam with 38 correct answers out of 40 possible. Awesome!

What is more awesome is that I “won” over the two colleagues of mine, who also attended 😛 But that of course dictates that I buy cake, hehe…

Now I’m waiting to receive some sort of certificate and a lilac badge.

Running OpenBSD off a flash drive

 
I’m planning on reducing the power consumption of and the noise from my VIA EPIA EN12000EG based home server. The server acts as media center, file server, backup server and authoritative DNS server. In a not so distant future it will probably also act as router and IPv6 tunnel endpoint. My plan is to replace its ordinary PSU with a more efficient and fanless picoPSU and to make its hard drive spin down when it hasn’t been used for a while. In addition, I will connect the server to my LAN with a cable rather than through wireless, which means I can retire the Linksys WRT54G that acts as a wire-wireless bridge for the server. I expect to go from approx 50 to 30 watts, on average, which is a saving of approx 0.02 kW · 24 hours/day · 365.25 days/year · 2 DKK/kWh = 350 DKK/year. Do you also smile when the units fit? 🙂

Okay, let’s get down to business. In order to have the hard drive spin up only when I access my music, videos and stuff, I need to move the server’s operating system – OpenBSD – to another disk. I will use a USB flash drive, as I happen to have one lying around and since they are silent and practically don’t consume power. The downside is that they are slow and die if you write to them often. That is solved using the server’s memory and a little ingenuity – the main topic of this post.

Frankly, I’m shocked at how little it takes to make OpenBSD run off a flash drive with some of its file systems in memory. You only need to follow seven steps:

1. Add a number of mfs’es to your /etc/fstab:

614940548185a78b.b none swap sw
614940548185a78b.a / ffs rw 1 1
swap /dev mfs rw,nosuid,-P=/mfs_backup/dev,-i=256 0 0
swap /var mfs rw,nodev,nosuid,-P=/mfs_backup/var,-s=60M 0 0
swap /root mfs rw,nodev,nosuid,-P=/mfs_backup/root 0 0
swap /home mfs rw,nodev,nosuid,-P=/mfs_backup/home,-s=20M 0 0
swap /tmp mfs rw,nodev,nosuid,-s=20M 0 0

(Note 1: The special “swap” entails default configuration parameters for mfs;
Note 2: The option “-i=256” ensures that we have enough inodes on /dev)

2. Install rsync (of course there is a precompiled package).

3. Create a synchronization script in e.g. /bin/mfs_sync.sh:

#!/bin/sh

RSYNC=/usr/local/bin/rsync
DEST=/mfs_backup

[ -d $DEST ] || mkdir $DEST

echo -n "Synchronizing directories to $DEST..."

for dir in dev var root home; do
    $RSYNC -a --delete /$dir $DEST/
    echo -n " $dir"
done

find $DEST -type s | xargs rm

echo

4. Test the script!

5. Let the script be run at shutdown by calling it from /etc/rc.shutdown.

6. Let the script be run e.g. once a day at 3:30 AM by adding the following line to root’s crontab:

30 3 * * * /bin/mfs_sync.sh >/dev/null

7. Reboot.

You should end up with something like this:

$ df -hi
Filesystem     Size    Used   Avail Capacity iused   ifree  %iused  Mounted on
/dev/sd1a      3.4G    798M    2.5G    24%   37452  430258     8%   /
mfs:24156      6.9M   32.0K    6.5M     0%    1263    6927    15%   /dev
mfs:11736     58.0M    6.0M   49.2M    11%     679   14679     4%   /var
mfs:29956      7.7M    9.0K    7.3M     0%       9    2037     0%   /root
mfs:27787     19.3M   10.0K   18.3M     0%      12    5106     0%   /home
mfs:1527      19.3M    4.0K   18.3M     0%       5    5113     0%   /tmp

I would like to thank Stephane Kattoor and Joel Knight for inspiration.

Now go and read the bloody details in mfs(8), fstab(5), rsync(1), find(1), rc.shutdown(8) and crontab(5) and make yourself worthy of their use.

Swimming, Fivefingers, Chrissie, ITIL

So what’s happening? 🙂

Well, many things are happening. I’ll try to focus on the interesting subset 🙂

Saturday I visited a local, indoor swimming pool for the first time in several months and explored my really poor swimming skills. As far as I know, my physical fitness is well above average, but swimming seriously elevated my heart rate. I swam 20 x 25 m (500 m) with a lot of pauses and felt rather groggy and dehydrated afterwards – I’m glad that I brought a bottle of water in my bag. I have never been a good swimmer, but now I intend to work on it and visit the local pool regularly.

Sunday I had my second almost-barefooted run in Fivefingers. It went well and I have now run approx 5 km in them in total. Compared to the first run, my feet and calves complain a lot less after this run. I also wear the Fivefingers during weight training, which speeds up the process of getting used to them. Now I’m waiting for my copy of Born to Run and I’m beginning to believe 🙂

In the weekend I read the last pages of a really good book about a really special woman. I felt sort of sad when I realized that I had reached the end. I am talking about A Life Without Limits, an autobiography by the British Triathlete and four-time World Ironman Champion Chrissie Wellington. She gives a glimpse into her very interesting life, she shows that all challenges can be overcome, and she is unbelievably inspiring and motivating. I wholeheartedly recommend her book. My favorite Chrissie-quote:

It’s not records I chase, it’s self-improvement. And that cannot be done by taking it easy.

Her award speech at Kona 2011 really touched me:

I know that the finals of the UEFA European Football Championship are being held at the moment, but I find much more joy in reading books like A Life Without Limits and practising sports on my own. Turn off your telly, get up from the couch and go practice your favorite sport. There’s a lot of sports to choose from. It’s much more rewarding than pretending that you, your city or your country wins anything, when the team on the screen wins. Of course I think it makes sense to support athletes or teams of athletes, but I just want to point out that you shouldn’t forget to realize yourself.

Monday, Tuesday and today I’ve attended an ITIL V3 Foundation course at Tech College Aalborg. ITIL is a set of good-practices for IT service management, which enables a service provider (like my workplace) to maximize value for its customers by providing correct functioning and resource efficient services. Foundation is the entry-level qualification of ITIL V3. The exam was this afternoon, and hopefully I will receive a certificate within a few weeks. You have one hour to answer 40 multi-choice questions. All questions present four choices, and you must answer 26 of the questions correctly to pass. I feel good about my effort, but I might be surprised, and the teacher talked about a relatively low pass rate…

Let me end my ramblings with the extremely awesome song La Grange from 1973 by the American rock band ZZ Top:

Minimalist running

I have bought a pair of Vibram Fivefingers KSO “shoes” and am giving minimalist running a shot. A couple of weeks ago I decided to go in that direction and was originally looking for a pair of flat, minimalistic, non-glove-style shoes. As I couldn’t decide on a pair, I decided to go as minimalistic as possible, without going completely barefooted. Blog posts around the net by marathoners and ultra-marathoners confirm that it is possible to become able to run long races in Fivefingers, and that was all I needed to hear.

Some of my reasoning is the following: If I ever want to try out minimalist running, or change my running style in some other fundamental way, this is a perfect time to do it, as I – due my recent shin/ankle problems – have to start “from scratch” anyway.

By the way – my shin/ankle has finally healed completely. It’s a joy.

I ran my first 2 km in the Fivefingers this morning 🙂

Chronix Aggression Top 100

I was wondering which songs were played most often by my favorite radio station, Chronix Aggression. To the scripting cave!

One month later I present to you a “Top 100”:

$ head -n 1 chronix.txt; tail -n 1 chronix.txt 
2012-05-04 15:42 Drowning Pool - Hate
2012-06-05 08:08 System of a Down - Chic 'N' Stu

$ sed -r 's/^.{17}//' chronix.txt | sort | uniq -c | sort -rn | head -n 100
     54 Firewind - Wall Of Sound
     49 Primal Rock Rebellion - Awoken Broken
     47 Primal Rock Rebellion - No Friendly Neighbour
     30 Tunes Of War - Remastered 2006
     29 Vol. 3 - (The Subliminal Verses)
     25 Revolution - Revolucion
     23 Edward The Great - The Greatest Hits
     18 Soilwork - Stabbing The Drama
     18 Rammstein - Du Hast
     18 Prong - Snap Your Fingers, Snap Your Neck
     18 Otep - Warhead
     18 Daksinroy - Bastards
     17 Agresion - Stay
     16 Snot - Snot
     16 CrawlBlind - Shiver
     15 Straight Line Stitch - Adult Cinema
     15 Slayer - Bloodline
     15 Slaves On Dope - Thanks For Nothing
     15 Sanctity - Laws of Reason
     15 Pantera - Walk
     15 Lamb Of God - Redneck
     15 In Flames - Crawl Through Knives
     15 Impending Doom - My Light Unseen feat. Ryan Clark
     15 Hope Dies Last - Never Trust the Hazel Eyed
     15 Fear Factory - Recharger
     15 Bullet For My Valentine - Your Betrayal
     15 A Perfect Murder - Body and blood
     14 System of a Down - Toxicity
     14 Straight Line Stitch - Black Veil
     14 Stonecreep - In The Age of Avarice
     14 Soil - Unreal
     14 Slipknot - Pulse Of The Maggots
     14 Slipknot - Psychosocial
     14 Slipknot - Duality
     14 Rob Zombie - Scum Of The Earth
     14 Machine Head - All Falls Down
     14 Machine Head - Aesthetics Of Hate
     14 Korn - Freak on a Leash
     14 Killswitch Engage - Rose Of Sharyn
     14 In This Moment - The Great Divide
     14 Insomnium - The Harrowing Years
     14 Hope Dies Last - Life After Me, Life After You
     14 God Forbid - AntiHero
     14 Eluveitie - Home
     14 Dry Kill Logic - Paper Tiger
     14 Divine Heresy - Failed Creation
     14 Bolt Thrower - When Cannons Fade
     14 As I Lay Dying - An Ocean Between Us
     13 Ventana - The Dying Sound
     13 Type O Negative - I Don't Wanna Be Me
     13 Tool - Schism
     13 Sybreed - Take The Red Pill
     13 Spike 1000 - Measure Me
     13 Sevendust - Face To Face
     13 Rob Zombie - Feel So Numb
     13 Revenant Dead - Death Spawn
     13 Marilyn Manson - The Beautiful People
     13 Lamb of God - Insurrection
     13 Kittie - Brackish
     13 Hatebreed - Live For This
     13 Hatebreed - In Ashes They Shall Reap
     13 Five Finger Death Punch - Bulletproof
     13 Exodia - Push The Button
     13 Eths - Sidus
     13 Dethklok - Bloodlines
     13 Chimaira - Year of the Snake
     12 Walls of Jericho - The American Dream
     12 Trendkill Method - free fall
     12 Sunset Nation - Artist ID1
     12 Static-X - Bled For Days
     12 Static-X - Black And White
     12 Soulfly - Prophecy
     12 Rob Zombie - Dragula
     12 Prong - Revenge...Served Cold
     12 Nailbomb - Exploitation
     12 Mechina - Clash Of Cultures
     12 Marilyn Manson - The Golden Age Of Grotesque
     12 Lamb Of God - Descending
     12 Kittie - Into The Darkness
     12 Jeff Loomis - Requiem for the Living
     12 In Flames - Where The Dead Ships Dwell (Radio Edit)
     12 In Flames - Trigger
     12 Grave Digger - Rebellion (The Clans Are Marching)
     12 Godsmack - I Stand Alone
     12 Five Finger Death Punch - The Bleeding
     12 Fireland II - EP
     12 Eths - Inanis Venter
     12 Bury Your Dead - Hurting Not Helping
     12 Bolt Thrower - Anti-Tank (Dead Armour)
     12 Anthrax - Fight 'Em Til You Can't
     12 All That Remains - Forever In Your Hands
     11 Wayne Static - Around The Turn
     11 Trivium - Like Light To The Flies
     11 Taproot - Poem
     11 System of a Down - Aerials
     11 Sybreed - Bioactive
     11 Sub Dub Micromachine - Road To Nowhere
     11 Straight Line Stitch - What You Do To Me
     11 Static-X - Tera-Fied
     11 Slipknot - Surfacing

Of course, some of them might be commercials. I use the list as inspiration when using Grooveshark, YouTube, etc.