Wednesday, December 30, 2009

Wireless problems on karmic - no probe response, disassociating

Adding to the litany of problems I have experienced with Ubuntu Karmic, I have been having terrible wireless problems at home. I'm experiencing disassociations every couple of minutes:

[ 7647.936113] wlan0: no probe response from AP - disassociating
[ 7649.299667] wlan0: authenticate with AP
[ 7649.336162] wlan0: autheniticated
[ 7649.336170] wlan0: associate with AP
[ 7649.436184] wlan0: RX ReassocResp from AP
[ 7649.436192] wlan0: associated
[ 7688.948079] wlan0: no probe response from AP - disassociating
[ 7696.585236] wlan0: direct probe to AP try 1
[ 7696.648183] wlan0 direct probe responded
[ 7696.648192] wlan0: authenticate with AP
[ 7696.748181] wlan0: authenticated

Turns out it is a problem with ath9x in the kernel so it isn't canonical's fault.

Installing linux-backports-modules-2.6.31 seems to have fixed the problem.

Friday, December 18, 2009

Set mp3 track names based on filename

A quick and dirty script I used to set mp3 track names based on file name for a given directory. Uses python and the id3v2 tagging tool. I didn't bother with album, artist, genre etc. because you can already use id3v2 to set them en-masse.

#!/usr/bin/env python

import glob
import os.path
import os
import re
import sys

list = glob.glob(os.path.join(sys.argv[1],"*.mp3"))
for thisfile in list:
track = re.sub("^[0-9]+(\s|\.|\-)+","",os.path.basename(thisfile))
track = track.replace(".mp3","")
print("/usr/bin/id3v2 -t \"%s\" \"%s\"" % (track,thisfile))
os.system("/usr/bin/id3v2 -t \"%s\" \"%s\"" % (track,thisfile))

Thursday, November 26, 2009

Dell NICs still causing problems with incomplete arps

I ran into the same problem again, this time with a BCM 5708 NIC on a Dell 2RU Poweredge 2950. Exactly the same symptoms: the box makes ARPs, which are answered, but the arp cache shows incomplete entries for all IP addresses. Setting the entries manually didn't help - my pings then just seemed to go nowhere. iptables was not getting in the way. There appears to be some discussion about the problem but no solutions...

My setup was a bridged interface that consisted of two bonded NICs to get more bandwith throughput using Cisco port channelling on the switch. Getting rid of the bond and just using a regular bridge on one of the NICs fixed it. Might try the NIC bonding again on the next hardware refresh.

Friday, November 13, 2009

Creating an audio CD from mp3 files on linux

K3b is great for this, you can just start an audio project and drag mp3 files onto it. On ubuntu karmic you will need these packages:

k3b and libk3b6-extracodecs

Saturday, October 31, 2009

CD ripping (sound-juicer) stuffed in karmic

My favourite CD ripper 'grip' has disappeared from the repository in ubuntu as of karmic. The built-in is sound-juicer, which sucks.

It comes with a shitty MP3 profile, but wouldn't even let me select it in the profile menu (yes, it was 'active'). Finally I ended up deleting all the profiles and creating my open mp3 profile, which allowed me to select it, but after I clicked extract, it always failed with 'failed to get output format'. I have the bad and ugly gstreamer packages installed, as well as lame.

I gave up and fell back to abcde, which is a command-line utility.

I edited '/etc/abcde.conf' and set:
LAMEOPTS="--preset standard"

then used 'abcde -o mp3'.

Why is it always so damn hard to rip a CD to mp3 in linux?

Monday, October 19, 2009

Howto install zabbix on ubuntu jaunty


apt-get install zabbix-server-pgsql

Get the auto-generated db password out of /etc/zabbix/zabbix_server.conf and use it when prompted in the next step:

apt-get install zabbix-frontend-php

If when you visit localhost/zabbix your browser tries to download a phtml file, you need to:

apt-get install php5-pgsql

and restart apache and the zabbix server.

If you try to import your zabbix config and you get "could not open XML input", you need to increase your "upload_max_filesize" in php.ini.

Zabbix mysql innodb backend shits itself on power outage

We had a power outage, and the mysql database that backs our zabbix install shat itself. The innodb tables couldn't recover themselves. I had to force an innodb recovery, which got me a running server, but I couldn't successfully do a mysqldump or select * into outfile because it failed on one table. I dumped everything else and tried a drop table on the corrupted table. The drop table didn't work, the mysql connection died after I hit enter and the table was still there. Eventually tried drop database with the same result. Yay.

Killed mysql and installed postgres.