Controlling OS X volume through Cron

One of the biggest annoyances of working from home is that with the computers in the room next door, the volume of your computers can cause a problem if someone suddenly calls you on Skype, or your backup software suddenly kicks in and starts beeping.

I never remember to mute the volume, so I started looking for a way to this automatically through cron at specific times. I also wanted to be sure that rather than setting a specific volume (and having to remember it), that I could just use the OS X mute function.

The solution is to combine Applescript, which you can run from the command line using the osascript command, with the command line limitations of cron.

There are three components, the two Applescripts that mute and unmute the volume, and the lines in a crontab to run the scripts.

To mute the volume with Applescript:

set volume with output muted

To unmute:

set volume without output muted

Save both these into Applescripts (use the Applescript editor so they are compiled).

Then we can just set the scripts to execute when required:

0 9 * * * osascript /usr/local/mcslp/volume-unmute.scpt
0 19 * * * osascript /usr/local/mcslp/volume-mute.scpt

I’ve set this on the three machines and now we get a silent night!

Cell processor programming

The Cell processor from IBM is probably best known for being a core component of the Sony Playstation 3, but there was a time (however brief) where we all though that it form the core of the next Mac, before Apple made the momentous decision of using Intel CPUs instead.

If you want to make use of the power of the Cell then you might want to check out the new series on IBM developerWorks, Programming high-performance applications on the Cell BE processor, Part 1: An introduction to Linux on the PlayStation 3. This promises to be an excellent guide to programming the Cell for your own nefarious (or otherwise) needs. Sadly I don't have a PS3 (I'm waiting for a Wii to be available), and I doubt the budget would stretch to one of these. Donations, of course, are always welcome!

Is data sharing going to far?

Stories like US 'licence to snoop' on British air travellers make you seriously wonder how far governments will go. We are on a very thin tightrope between security of ourselves and countries and the security of the information about individuals.

It is reasonable to expect information such as passport info, date of birth and other information to be supplied. But other elements - email addresses, dietary requests - seem a step too far.

I can only agree with Shami Chakrabati - a well known figure on human rights here in the UK:

Sun Ultra 20M2 performance

I'm still preparing my review of the Sun Ultra 20M2 (in fact, I'm writing it in the other tab as I type this), but there's a really good summary of the performance of the beast: Geek Patrol | Sun Ultra 20 M2 Performance.

The figures compare Solaris and Windows on the same box and show some interesting differences in the performance of the two OS on what is otherwise and identical box. For example, these results show that bzip2 compression is much faster on Solaris compared to Windows, yet decompression with bzip2 is faster on Windows than Solaris.

EnergyWatch: appliances vs gadgets

In Real Time: A Hunt for Energy Hogs, Jason Fry did some tests to find out what was really using up the energy in his home.

According to his tests, his other appliances - dryer, cooker, etc - used a lot more energy than the computers, routers and other devices. I don't doubt he's correct.

Light bulbs are remarkably inefficient (which is why I recommend CFLs), and anything that includes both a heating element and a motor (like a dryer or washing machine) at full AC voltage, is going to use a lot of energy compared to the relatively low-end motors and silicon in a computer.

EnergyWatch: Appliances vs Gadgets

In Real Time: A Hunt for Energy Hogs, Jason Fry did some tests to find out what was really using up the energy in his home.

According to his tests, his other appliances - dryer, cooker, etc - used a lot more energy than the computers, routers and other devices. I don't doubt he's correct.

Light bulbs are remarkably inefficient (which is why I recommend CFLs), and anything that includes both a heating element and a motor (like a dryer or washing machine) at full AC voltage, is going to use a lot of energy compared to the relatively low-end motors and silicon in a computer.

CPU Buyer’s Guide

Looking for a new computer to start the new year with? You might want to check out the information on CPUs available in the Computerworld CPU Buyer's Guide. There's also a handy CPU Buyer's Guide: Quick Reference Charts.

Looking at that chart, it's difficult to choose between the three Intel CPUs at $999, but for my money, I'd go for the Core 2 Extreme QX6700; with four cores, I can imagine doing serious processing with that.

What’s going on?

Just in case you think I’ve forgotten about things, I haven’t, I’m just somewhat buried.

What’s been happening? Well Busy New Year will explain part of it.

On the Sun/Solaris front:

  • Sun shipped me a new card to fit into the T1000 to get some better performance on the network interface. This was after a really good conversation with Sun about Squeezing the last drops of performance from the T1000. It arrived right between Christmas and New Year, so I haven’t had time to play with it yet.
  • I’m still testing the Ultra 20M2, but let’s just say it’s cool and fast. There’s a review going out on my ComputerWorld blog soon that gives a quick overview.
  • Solaris testing - I’ve been putting together some more detailed examples on using Solaris with Parallels, particularly for testing ZFS. This is particularly cool because you can play around with pools and other elements without requiring a hardware solution, and then start all over again if you muck it up.

Stay up to date with Planet MCslp.

MySQL on Solaris

Frank Mash has started a brilliant series on making the best of running MySQL on the Solaris platform:

No, I haven’t missed one out, Frank assures us that Part 5 is on the way!

I wish we had a DTrace interface to MySQL…

All the MCB Guru blogs that are fit to print