Monday, December 31, 2007

Last Post for 2007

My birthday was a great day, thanks to every-one who sent well wishes and participated, the birthday elves were very kind to me and organised all sorts of dinners and treats. My reading list now includes Robert Kiyosaki's Before You Quit Your Job and Terry Pratchett's Making Money as well as Why We Want You To Be Rich by Donald Trump and Robert Kiyosaki not sure how the finance theme managed to overtake my "pleasure" reading list as well but lets hope it's a good sign for the new year :-)

On Saturday a group of us went up to the Quiet Cone in Parkerville. The quiet cone is a kind of Tipi shaped structure made out of metal and lined with something with acoustic properties. You lay down and relax whilst the "Gong Master" plays several large gongs and some other resonant instruments. The whole process takes around an hour inside the cone. I'm sure people go all metaphysical about it but I found it a very relaxing and uplifting experience. Worth a revisit.

My New Years resolutions are tonights job I suppose and just as well because nothing brand new leaps out for me right now except to continue the work of this year in terms of health and wealth. I've lost a few kilo's and I'm looking and feeling much better but there is still a way to go. Financially I'm still making other people more wealthy than myself and trading off lifestyle (or just literally life, mine!) for it, this coming year is the time to turn that around. This is the year of the baby though and as a first time going-to-be Dad I'm clear that I don't know what to expect, so long as Mum and bub are healthy I'm sure we will muddle our way through the rest.

We are seeing in 2008 quietly, or at least that's the plan right now at 3:35pm! Where-ever you are and what-ever you are doing be safe. I hope that in 2008 you are kind to the earth and all beings and that the year brings you peace, joy and fulfillment.

Friday, December 28, 2007

Birthday Wishes

Seeing as Linus Torvalds and I have our birthday today I thought I would send out best wishes to every-one and especially to all you mad Capricorns that I love so much: Lisa, Sandra, Penny, Glenn, David, Janet. Whenever yours is I hope you have a beautiful day for your birthday and a great year!

Thursday, December 27, 2007

National Treasure: Book of Secrets

We went and saw National Treasure: Book of Secrets last night. It was the hottest December day on record here in Perth and with the air-con out of order in our lounge the cinema was the next best place to be. Book of Secrets continues the treasure hunting and defence of the Gates family name themes from the original National Treasure in a sort of a Indiana Jones meets the Da Vinci Code way which, fortunately, doesn't take itself too seriously. Nothing high brow here just good clean fun, if you like the genre you won't be disappointed.

Saturday, December 22, 2007

Christmas Activity

A few days off over Christmas and I've completed or made a valiant start on a couple of projects that have been requiring attention for some time. My desktop is now running Fedora 8. (I still keep wanting to say "Fedora Core 8"). Fedora 8 comes with no surprises, so far everything has just worked, but nothing has leapt out as being new and exciting either.

I also transferred a (substantial) chunk of the data from Insubstantial over to here. Insubstantial was supposed to be a website not a blog but most (all?) of what I wrote over there was more journal type stuff than anything else, or maybe living with blogs for so long now has changed how I think about stuff. I've done my best not to change history and leave everything as close to how it was as possible- some editing has been inevitable though, mostly to go from Kwiki formatting to what Blogger uses. Lessons learnt; Kwiki is a fine wiki but made an ordinary blog. Data transfer is important. Wiki's don't necessarily lend themselves to ease of data transfer, formatting shortcuts differ between wiki's and is useless outside of a wiki, I dumped and transferred mostly as html but I would be somewhat cautious about using wiki syntax again.

Sometime in the next few days I will redirect Insubstantial to here and enable custom domain in Blogger settings and the transition will be done.

We had christmas dinner 3 times- christmas eve with Lisa's mum and family, christmas day lunch with Lisa's dad and family and then boxing day lunch with my lot. Favourite dish from the three meals: Lisa's mums nut roast is the only thing that really leaps out. Will have to get the recipe. Lisa made a pretty damn fine bruschetta one night too. I made a bean salad to take to my parents, my own recipe and it is great.

Lisa bought me an 8G thumb drive which she thought was a pretty ordinary gift but which I loved. I bought her some diamond ear studs and the reverse was true :-)

Gift I didn't get that I hope comes for my birthday: Making Money by PTerry :)

What did the jolly fat redman bring for you?

Beowulf

I finally saw Beowulf the other day. It's an animated(ish), drinking, fighting, carousing, jumpy out and get you kind of a story. Imagine crossing Shrek with Aliens with The Three Muskateers and you would be in the right realm. It's a good fun movie though the Aliens aspects mean it's probably not safe for the kiddies- "intense sequences of violence including disturbing images, some sexual material and nudity " just about covers it; yes you get to see Angelina Jolie with her gear off, or at least a digitally rendered version of her. It's a much brighter production than the 1999 Beowulf though for my money Christopher Lambert was a better Beowulf. If you've got them then pack the kids of to the baby sitter and enjoy.

Wednesday, December 19, 2007

Desktops and applications

I tend to be more of a GNOME fanboy than KDE. (This stems from right back when Qt was proprietary). I've tried KDE every year or two and most notably the last time I stuck it out for a good few weeks before going back to GNOME. Over the years I've watched configuration options disappear from GNOME (sorry can't think of a single one of them though) and generally lamented their disappearance at the time and then forgotten I could ever tweak "that" after a few weeks; whilst of course remaining indignant at the design philosophy that took it away from me. But for reasons I can't really express (and it could be just familiarity) I like GNOME. Because of that I also tend to favour the GNOMEish applications (AbiWord and Gnumeric are my word processor and spreadsheet of choice). So when a KDE application stands out as simply better then to me it really stands out. The two KDE applications I turn to first at the moment are K3b for CD/DVD burning and KTorrent for downloading all those BitTorrent goodies, unlike their GNOME (and other) equivalents in both cases they just work and in just the way I expect.

Backing up Veritas configurations

Over at Symantec they recommend you backup your Veritas configurations for disaster recovery but then say "What is not a good idea is to set up a cron job to back them up often." Well why not? Because you could be backing up a dodgy configuration is their reasoning I suppose. Sounds like we need to keep a few copies if there have been changes then. Perl is my usual weapon of choice but this seemed like a good fit with shell. Use the code at your own risk but it seems to work OK for the environment I'm currently working in...





#!/bin/ksh
#
# backup veritas configurations
#
# as specified at http://seer.entsupport.symantec.com/docs/180321.htm
#
# saves the last x differing copies of your veritas config, a config is only saved
# if it is different to what has already been saved
#


DIR="/path/to/someplace/to/store/veritas_configs"
NUM_OF_BACKUPS=5 # we keep the newest this many...

device_to_os_native () {
device="$1"
# use vxdisk -e list as vxdisk path doesn't work for all versions
os_native=`vxdisk -e list | grep "^$device" | awk '{print $NF}'`
echo $os_native
}

if [ ! -f "/etc/vx/volboot" ]; then
[ -t 1 ] && echo "Veritas not running here, exiting"
exit
fi

if [ `/usr/bin/id | grep -c "^uid=0(root)"` -ne 1 ]; then
[ -t 1 ] && echo "$0 can only be run as root"
exit
fi

HOST=`uname -n`
DATE=`date +"%Y%m%d-%H%M%S"`

vxdisk_list="${DIR}/${HOST}_vxdisk_list.${DATE}"
vxdisk_list_detail="${DIR}/${HOST}_vxdisk_list_detail.${DATE}"
prtvtoc_all_disk="${DIR}/${HOST}_prtvtoc_all_disk.${DATE}"
vxdg_detail="${DIR}/${HOST}_vxdg_detail.${DATE}"

>$vxdisk_list
>$vxdisk_list_detail
>$prtvtoc_all_disk
>$vxdg_detail

vxdisk list >>$vxdisk_list
vxdisk -q list | awk '{print $1}' | xargs vxdisk list >>$vxdisk_list_detail

for disk in `vxdisk -q list | awk '{ if ($2 != "simple") print $1 }'` ; do
if [ `echo $disk | grep -c 'c.*t.*d.*s.*'` -ge 1 ]; then
disk="/dev/rdsk/$disk"
else
os_native=`device_to_os_native $disk`
disk="/dev/rdsk/$os_native"
fi
prtvtoc $disk >>$prtvtoc_all_disk
done



for vxdg in `vxdg -q list | awk '{print $1}'`; do
vxprint -g $vxdg -rhmvps >>$vxdg_detail
done



for file in vxdisk_list vxdisk_list_detail prtvtoc_all_disk vxdg_detail ; do
# get the second last file (last file is the one we just created)
last=`ls -1tr ${DIR}/${HOST}_${file}.* 2>/dev/null | tail -2 | head -1`

eval "current=\${$file}"
# if $last == $current then it's then we have no previous data
# for this host
if [ "$last" != "$current" ]; then

# if current has the same contents as last then delete current
# diff exits 0 if the files are the same...
/usr/bin/diff $current $last >/dev/null 2>&1
if [ $? -eq 0 ]; then
# files are the same
[ -t 1 ] && echo "Configuration unchanged removing $current"
rm -f $current
fi
fi

# if there are more than 5 copies of file
# delete the oldest copies down to 5

files=`ls -1tr ${DIR}/${HOST}_${file}.* 2>/dev/null`
num_of_files=`echo "$files" | wc -l | sed -e "s/ //g"`
if [ $num_of_files -gt $NUM_OF_BACKUPS ]; then
num_to_del=$(($num_of_files - $NUM_OF_BACKUPS))
count=0
for file in $files ; do
[ $count -eq $num_to_del ] && break
[ -t 1 ] && echo "Removing older version of $file"
rm -f $file
count=$(($count + 1))
done

fi
done