Ming the clam is ‘oldest animal’

October 28th, 2007

I can’t help thinking that there’s a certain irony here:

A clam dredged up off the coast of Iceland is thought to have been the longest-lived creature discovered.

Scientists said the mollusc, an ocean quahog clam, was aged between 405 and 410 years and could offer insights into the secrets of longevity.

Researchers from Bangor University in north Wales said they calculated its age by counting rings on its shell.

Of course we only know this because the clam’s been dredged up and, er, killed.

What’s thrashing my Macbook disk?

October 28th, 2007

So far, my MacBook Pro has been running really well, with one or two very minor niggles. One of these was the speed of going to sleep - there would be a good 30 seconds elapsed between closing the lid and the sleep light “snoring”; and the other problem was that the disk seemed to be getting thrashed to bits for no apparent reason. Even when sitting quietly apparently doing nothing, the disk would be churning away. For all I knew, this might be something normal, but constant disk activity seems a bit odd.

The first step was to find out what was thrashing the disk. The built-in OS X Activity Monitor will show you the volume of disk activity, but there’s no way to work out what is doing the read/writing. So the next port of call is to work out which process is the cause. The easiest way of doing this is to use the fs_usage command, that monitors disk access and captures details of the process that’s doing the accessing.

If you run this on the command line, the data scrolls past until you stop it with ctrl-c - but that’s generally too fast to be useful, so you’re better piping the output into a file like this: sudo fs_usage -w > file1.txt The fs_usage command needs to run with root permissions, hence the sudo command.

Then you can open the file in a text editor, e.g. mate file1.txt and analyse at your own pace. The -w switch forces wide output, so you get all the data being reported - but you’ll need to widen your text editor window in order to be able to see this. In the right-hand column you’ll see the application names reading and writing to the disk.

In my case, the problem was obvious - at least 95% of the data being recorded in the file was caused by Google Desktop. I don’t know exactly what it was doing - indexing, presumably - but it was enough to thrash the disk and also as it turns out, slow down the process of going to sleep. I don’t know whether this constant disk activity is normal for Google, but I don’t use Google Desktop enough to make it worth while - so It Had To Go.

That turned out to be slightly less than straight-forward, due to the non-standard way that it gets installed. After several false starts where the same process would reappear after a reboot despite apparently uninstalling the software itself, I came across this set of instructions at Daring Fireball which outlines exactly what gets installed where. After working through this list and zapping the files, a final reboot resulted in peace and quiet, and a sleep as quick as I’ve been used to with a G4 Powerbook.

Oops - the Revenue has lost your data

October 8th, 2007

BBC: Revenue laptop theft investigated

Hundreds of people could be at risk of identity fraud after a laptop holding sensitive information was stolen from an HM Revenue and Customs worker.

The laptop was stolen from the boot of an HMRC car last month.

So, are we all reassured about the prospect of 51 separate pieces of identifying information being held on our super-soaraway ID cards??

Tweaking MAMP Pro settings

October 4th, 2007

I’ve started using MAMP Pro to run local Apache and MySQL servers on my Macbook, mainly because they’ve got a rather more user-friendly front-end when it comes to controlling the most-commonly needed configuration settings. Being able to switch DocRoots and database directories is quite handy when you’re bouncing from project to project.

MAMP Pro is basically MAMP with a lot more of the configuration exposed through a GUI, and for $20 or so I figured it was worth it. Installation is the usual drag-and-drop Mac affair, and stopping and starting the servers is nothing more than a mouse-click.

The problem arose when I tried to run a MediaWiki install, whereupon it immediately fell over complaining of lack of memory available for PHP. By default PHP5 allocates a maximum of 8Mb, which is nowhere near enough for MediaWiki. Changing it is simply a matter of amending the php.ini file and restarting the servers - or so I thought. MAMP had other ideas - every time the server was restarted, it overwrote my amended file, started up PHP with the usual 8Mb and MediaWiki promptly fell over.

This was driving me nuts until I hit upon having a look inside the application itself. If you right-click an application in the Finder and select the ‘Show Package Contents’ option, you get to peer inside the app itself, or at least access the component and configuration files associated with it. In MAMP’s case, that allows you to get hold of the original version of php.ini and be able to edit it - it’s hidden inside the ‘Resources’ folder, but can be edited at will. Alter this to the required values, restart the servers again and away you go.