The Shoes of the Fisherman's Wife Are Some Jive-Ass Slippers

tpot (at) frungy . org

rss

2006
Months
Dec

Tue, 12 Dec 2006

Dodgy WiFi access point

At San Francisco Airport:

# iwlist eth1 scan
eth1      Scan completed :
          Cell 01 - Address: 00:17:59:1B:5E:10
                    ESSID:"tmobile"
                    Mode:Master
                    Frequency:2.437 GHz (Channel 6)
                    Signal level:-46 dBm  Noise level:-85 dBm
                    Encryption key:off
          Cell 02 - Address: 02:16:6F:00:06:35
                    ESSID:"Free Public WiFi"
                    Mode:Ad-Hoc
                    Frequency:2.462 GHz (Channel 11)
                    Signal level:-52 dBm  Noise level:-84 dBm
                    Encryption key:off

Hmm - an ad-hoc access point advertising free access in the same area as a pay for use one. Somehow I don't think so. Unfortunately it disappeared before I could get an IP address and have a poke around.

posted at: 08:43 | path: /computers | permanent link to this entry

Wed, 25 Oct 2006

Tridge on NULL pointer checks

From the samba-technical mailing list:

From:		tridge@samba.org
To:		samba-technical@samba.org
Subject:	Re: Coverity errors in libndr/
Date:		Wed, 25 Oct 2006 12:35:56 +1000

Luke,

 > Or put some assertion checks in?

time for my bi-yearly rant about assertions on NULL dereference :)

Unix and unix-like systems provide a highly efficient, zero code
assertion system. It interfaces to debuggers, it correctly propogates
to parent processes and it is even implemented in hardware on nearly
every system in existance. 

It's called the segmentation fault. It's wonderful. Use it :-)

Cheers, Tridge
posted at: 16:01 | path: /software | permanent link to this entry

Fri, 20 Oct 2006

Tour de Donut

For those travelling to Texas this November, may I recommend the Tour de Donut? It's a 28 mile bicycle race near Austin. From the information page:

The Tour de Donut is a unique bicycle race where riders embark on an appetizing 28-mile journey beginning at the Katy Mills Mall (in Katy, Texas of course!) with rest stops along the way serving as many delectable donuts as you can eat.

For EACH tasty donut that a rider consumes, the rider is awarded a tempting 5-minute time credit.

Eat enough delicious donuts, and you can finish the race before you even started!

Sweet! I guess that means it's also possible to finish the race having consumed more calories than used to ride it.

posted at: 14:42 | path: /triathlon | permanent link to this entry

Mon, 16 Oct 2006

bfr - nonblocking 8-bit-clean pipe buffer

I recently discovered the bfr program while searching for a way to watch a large video file stored on a web server connected by a slow pipe. The premise is that your link is slower than the rate at which the video codec consumes data so say hello to Mr Progress Bar every ten seconds or so. Most video players can buffer up a small amount of data and some even allow you to change the size of the buffer but sometimes this just doesn't work well.

Here's my command line:

$ wget -q -O http://some.domain/bigassfile.ogg | \
  bfr -pk -b 100m | \
  xine stdin://
The command line above starts a wget of a big-ass file, then uses bfr to start accumulating up to 100M of data and displays a progress bar in KB on stderr. The xine video player is used to display the output appearing on standard input.

The exact moment when streaming starts is 10% of the buffer size though the options to change this don't seem to work as advertised in the manual page. The progress bar is very nice though as it displays a graphical display of the size of the buffer, as well as the rate data is entering and leaving. If the buffer empties completely, you can hit pause in xine and go get a cup of coffee while the buffer refills.

posted at: 14:33 | path: /software | permanent link to this entry

Tue, 26 Sep 2006

agulbra-switch-cpp-h

I was thinking the other day that my life would be so much better if I could be editing a C++ file in Emacs and by simply hitting a key, the header for that file would be loaded. Hitting the key again would swap back from the header to the implementation. Before breaking out the Emacs Lisp manual I did a quick search and it turns out that those crazy kids at KDE have such a function in their kde-devel-emacs.el file.

Copy this bit of elisp somewhere and bind it to a key:

; From kde-devel-emacs.el, by by David Faure <faure@kde.org>

(defun agulbra-switch-cpp-h ()
  "Switch to the corresponding .cpp, .C, .cc or .h file."
  (interactive)
  (let ((n (buffer-file-name))
        (c nil))
    (cond ((and (string-match "\\.h$" n)
                (progn
                  (setq c (replace-match ".cpp" t t n))
                  (file-readable-p c)))
           (find-file c))
          ((and (string-match "\\.h$" n)
                (progn
                  (setq c (replace-match ".cc" t t n))
                  (file-readable-p c)))
           (find-file c))
          ((and (string-match "\\.h$" n)
                (progn
                  (setq c (replace-match ".C" t t n))
                  (file-readable-p c)))
           (find-file c))
          ((string-match "\\.h$" n)
           (find-file (replace-match ".cpp" t t n)))
          ((string-match "\\.h$" n)
           (find-file (replace-match ".cpp" t t n)))
          ;((string-match "_[a-z]+[0-9]*.cpp$" n)
          ; (find-file (replace-match ".h" t t n)))
          ((string-match "\\.cpp$" n)
           (find-file (replace-match ".h" t t n)))
          ((string-match "\\.cc$" n)
           (find-file (replace-match ".h" t t n)))
          ((string-match "\\.c$" n)
           (find-file (replace-match ".h" t t n)))
          (t
           (error "%s is neither .h, .cc, .C or .cpp" n)))))

posted at: 17:35 | path: /software/emacs | permanent link to this entry

Thu, 21 Sep 2006

Operation Ride-A-Lot

I dropped Anna and the in-laws off at the airport on Monday (I feel a bit like a tour organiser) for a backpacking holiday. Now I'm on my own for a couple of weeks so I thought I would try and do more km on the bike than in the car. It's turning out OK so far, although I had to head in to Queanbeyan to see the accountant and buy some coffee related paraphernalia in Fyshwick so I've started 38km behind already.

Riding to work and to the pool and back over the last two days has put on 55km and with a few training rides with the triathlon club I should be able to put on a couple of hundred kilometres more without too much hassle. It's also dry and getting warmer so riding around Canberra is quite nice at the moment.

posted at: 09:25 | path: /triathlon | permanent link to this entry

Wed, 06 Sep 2006

On Safari

I subscribed to O'Reilly's Safari online library today, or rather convinced work to pay for it (woot). I thought about subscribing when it was first released (in 2001, apparently), but baulked because it "only" contained the O'Reilly titles. Now there are stacks more books available, about 650 as of May 2006.

Tim O'Reilly makes some interesting comparison with physical book sales in a blog post on O'Reilly Radar. (Warning: link contains references to wanky long tail stuff). According to the Safari logs, the graph of page views vs book sales is a lot flatter and longer for Safari, and actually tips up at the end of the tail.

Australia, and especially Canberra, doesn't have very many good technical bookstores compared to a Borders or Barnes & Noble in a decent sized US city so local book browsing is limited to the current new releases of .NET, VB and Cisco training books. Oh yeah, Safari's also searchable. Neat.

posted at: 20:46 | path: /computers | permanent link to this entry

Tue, 22 Aug 2006

Hard Disk Busted

Well the mythtv box has been running fine for 8 months or so but I noticed a couple of bad sectors appearing on one of my 300GB disks. Unfortunately they didn't get remapped transparently by spare sectors as modern hard disks are supposed to. The only thing for it was to remove the disk from the LVM set.

Since I am too cheap to use RAID (it's only TV after all) I backed up all the interesting stuff then deleted and recreated the volume. Luckily cacti caught all the action:

The discontinuities on Saturday morning was me trying to blow away the bad sectors with dd a la the Bad Blocks Howto without success. On Monday morning I deleted all the shows that I didn't want to backup, then recreated the logical volume. Then copied all the backups on to the new, 300GB smaller volume.

I don't think that hard disks should fail after 8 months, and the store is taking the broken one back without any fuss.

posted at: 09:32 | path: /pvr | permanent link to this entry

Mon, 21 Aug 2006

Amusing Spamasassin Log Messages

Actual log messages from spamasassin:

Aug 20 00:30:19 dp spamd[15285]: Hour '24' out of range 0..23 at /usr/share/perl5/Mail/SpamAssassin/Util.pm line 429
Aug 19 16:01:03 dp spamd[21435]: Second '60' out of range 0..59 at /usr/share/perl5/Mail/SpamAssassin/Util.pm line 429

posted at: 08:08 | path: /humour | permanent link to this entry

Wed, 17 May 2006

Would the person who has named their machine samba.org...

...please knock it off.

Here are the log files back that you keep mailing to us. We don't want them.

From: Charlie Root <root@samba.org>
To: root@samba.org
Subject: samba daily run output

Removing stale files from /var/preserve:

Cleaning out old system announcements:

Removing stale files from /var/rwho:

Backup passwd and group files:

Verifying group file syntax:

Backing up mail aliases:

Disk status:
Filesystem  1K-blocks    Used   Avail Capacity  Mounted on
/dev/ad0s1a   8950142 4815448 3418684    58%    /
devfs               1       1       0   100%    /dev

Last dump(s) done (Dump '>' file systems):

Network interface status:
Name    Mtu Network       Address              Ipkts Ierrs    Opkts Oerrs  Coll
rl0    1500 <Link#1>      00:e0:4c:d3:5b:a1   287510     0   172315     0     0
rl0    1500 192.168.46    samba               180153     -   108604     -     -
rl0    1500 fe80:1::2e0:4 fe80:1::2e0:4cff:        0     -        4     -     -
xl0    1500 <Link#2>      00:0a:5e:5e:b0:c5   879366     0    84475     0     0
xl0    1500 192.168.48    192.168.48.1        262205     -    20446     -     -
xl0    1500 fe80:2::20a:5 fe80:2::20a:5eff:        0     -        4     -     -
vr0*   1500 <Link#3>      00:14:2a:94:6a:30        0     0        0     0     0
plip0  1500 <Link#4>                               0     0        0     0     0
lo0   16384 <Link#5>                            7528     0     7528     0     0
lo0   16384 your-net      localhost.org         7528     -     7528     -     -
lo0   16384 localhost.org ::1                      0     -        0     -     -
lo0   16384 fe80:5::1     fe80:5::1                0     -        0     -     -

Local system status:
 3:01AM  up 2 days,  7:05, 0 users, load averages: 0.01, 0.00, 0.00

Mail in local queue:
                /var/spool/mqueue (2 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient
                 (reply: read error from dp.samba.org.)
                                         <operator@samba.org>
k3J30ZNp012363*      88 Wed Apr 19 03:00 <operator@samba.org>
                                         <operator@samba.org>
                Total requests: 2

Mail in submit queue:
/var/spool/clientmqueue is empty
                Total requests: 0

Security check:
    (output mailed separately)

Checking for denied zone transfers (AXFR and IXFR):

-- End of daily output --
posted at: 18:00 | path: /internet | permanent link to this entry

On Dodgy Log Messages

logcheck is cool. A stray SMART error message in /var/log/messages suggested that a disk in the RAID array on samba.org was going to fail. Turns out that the RAID controller was not fully supported under Linux when the machine was installed, so RAID status info was not being logged and one of the disks had completely failed a number of months ago. Thanks to efforts by tridge we had a new disk up and running within a short period of time.

This has spurred me to continue tweaking my logcheck filters in case something like this happens again. It's very easy to visually filter (i.e completely ignore) a large number of messages and miss out on the important stuff so I've been researching each unfiltered message that appears and either doing something about it, or creating filter so I don't see it in the future.

According to this mailing list posting, the log message:

May 17 00:46:12 dp spamd[656]: prefork: select returned error on server filehandle:  

is perfectly normal and occurs every time a spamd child processes 200 messages. Unfortunately this message implies something has gone wrong when really everything is OK. Why does it appear in the log file then? Grr.

posted at: 12:23 | path: /software | permanent link to this entry

Thu, 30 Mar 2006

PyMedS

John-Mark Gurney has picked up my old abandoned media server code and make it work a bit better. Check it out here.

posted at: 09:33 | path: /pvr | permanent link to this entry

Mon, 13 Mar 2006

Geeks on Strike

From a recent slashdot story about geeks going on strike:

"Nice computer you have there. Shame if nothing were to happen to it".

posted at: 14:24 | path: /humour | permanent link to this entry

Sat, 11 Feb 2006

Merge command

Because I can never remember the command line for merging between Samba branches, here it is:

svn merge \
	svn+ssh://samba.org/data/svn/samba/branches/tmp/deryck-samba4-swat \
	svn+ssh://samba.org/data/svn/samba/branches/SAMBA_4_0 .
posted at: 11:20 | path: /software/samba | permanent link to this entry

Thu, 02 Feb 2006

Postgrey

I had a whole lot of spare time on Tuesday so I went about installing postgrey, a greylisting policy server for postfix on samba.org. The install went well, but I ended up using a configuration that was not suitable for servers that run programs that deliver mail using SMTP over localhost, like mailman. It turns out I needed permit_mynetworks in the smtpd_recipient_restrictions configuration to get things working nicely.

After thinking about it for a while, I realised that Volker asked me to install postgrey at the last to CIFS conferences, which means that this task has been on my to do list for at least two years. Well at least it's done now!

posted at: 11:32 | path: /software | permanent link to this entry

Thu, 19 Jan 2006

Python Media Server Abandoned

Some people have been asking about my Python Media Server code. The story is that I have ceased development on it due to continuing bad experiences (bad wireless support, bad playback of MPEG-2 and MPEG-4 files, media server bugs) with the Zensonic Z400. I have since given up and have set up a MythTV setup instead.

The code, such as it is, can be downloaded here in case anyone is interested. It has been licensed under the MIT license.

posted at: 13:44 | path: /pvr | permanent link to this entry

Tue, 17 Jan 2006

New Tuner

Well wouldn't you know it, two tuners for a PVR just isn't enough. Who would have guessed. I bought a third tuner yesterday, a DNTV Live! LP as the FusionHDTV Lite cards don't seem to be available anymore. Chris mentioned that the driver for these cards, at least in kernel 2.6.12, doesn't detect the card properly.

Jan 17 18:02:24 localhost kernel: cx88[0]/2: found at 0000:05:06.2, rev: 5, irq: 16, latency: 32, mmio: 0xc9000000
Jan 17 18:02:24 localhost kernel: cx88[0]/2: cx2388x based dvb card
Jan 17 18:02:24 localhost kernel: mt352_read_register: readreg error (reg=127, ret==-121)
Jan 17 18:02:24 localhost kernel: cx88[0]: frontend initialization failed
Jan 17 18:02:24 localhost kernel: ACPI: PCI interrupt for device 0000:05:06.2 disabled
Jan 17 18:02:24 localhost kernel: cx88-dvb: probe of 0000:05:06.2 failed with error -1
Jan 17 18:02:38 localhost kernel: cx2388x dvb driver version 0.0.4 loaded

I think he had to patch the driver and recompile, but google finds a better way. Just add a line to a new file in /etc/modprobe.d and everything is OK.

options cx88xx card=19

Myth picked up the new tuner after a 30 second trip to the configuration utility. However due to some possible kernel upgrade wierdness I discovered I had lost sound. I needed to change the sound output device from /dev/dsp to ALSA:default and the mixer device from /dev/mixer to default. I guess some of the old OSS device files are no longer supported and have been replaced by ALSA ones.

Next I'll be thinking that 250GB is not enough to hold my recordings...

posted at: 18:51 | path: /pvr | permanent link to this entry

Fri, 13 Jan 2006

Planet Mirror Looking for Staff

The guys at Planet Mirror are looking for staff. From their ad:

Planet Mirror is one of the premier download resources in the world. Daily we exceed over 1 Million downloads to 500,000 people and push out over 2TB of traffic (yes, Terabytes). We have over 15 TB of RAID5 storage covering 1000+ archives and 5 million files.

Holy crap! 2TB of traffic per day! That is some serious bandwidth. I wonder what the statistics are for the average download size? The mean download is 50MB per person, but it's probably skewed bimodally by users downloading either many small files or a smaller number of ISO images.

posted at: 10:00 | path: /computers | permanent link to this entry