Archive for November, 2010

Apple iTunes quality checks

Wednesday, November 17th, 2010

Some time ago I purchased Mythbusters series 6 and 7 on the iTunes store and downloaded several gigabytes of episodes. I was watching one of the last episodes yesterday and it reliably skipped significantly at a couple of points with a complete loss of audio and video for 10 seconds or so.

I managed to finish the episode and more or less understand what was going on, but made a note to drop Apple an e-mail at some point asking for a fresh copy of the episode as it was obviously rather annoying.

Imagine my surprise this evening when I received an e-mail from iTunes saying that they had noticed that the item had “noticeable quality issues” and so they had placed another copy on my account and I just had to fire up iTunes and get it to check for new items available for download.

Sure enough, a quick trip in to iTunes and the store showed that there was indeed a download of the episode in question available and in a few minutes later I had a pristine new copy (the joys of 50Mbps broadband!).

Undoubtedly some privacy groups somewhere will complain that iTunes sent this data back to Apple, but in the end why should I care? The transmission of this data doesn’t really infringe my privacy in any way and I benefitted as a consumer as a result.

What’s more, my view of Apple as a consumer has gone from potentially irritated or even annoyed to very impressed with the customer service. How better to stop complains than to respond pro-actively?

Using kill to display dd progress

Tuesday, November 9th, 2010

How long has that dd process been running for now? Is it even doing anything? How long is it going to take?

If you want dd to give you a progress update, then find out the process ID (PID) and then send the USR1 signal to it with

kill -USR1

And dd will then print out the same records in/out, bytes copied, time taken and overall speed to STDERR as it would when it finishes.

It doesn’t matter if you are re-directing STDOUT (such as to pipe the data stream to another machine via netcat or even compressing it with gzip) but make sure that you aren’t sending STDERR anywhere such as /dev/null

Make sure you specify the “-USR1” argument to kill as you don’t want to send SIGTERM to dd by mistake!
By default, kill will send SIGTERM (or SIGKILL if you use kill -9) to the specified process, but using “-USR1” you are telling kill to send a different signal, in this case one that causes dd to print the progress summary and so you aren’t actually going to “kill” the process.

You can even use have the progress refresh every few seconds with a command such as

watch -n 10 kill -USR1 $PID

Just replace $PID with the PID of the running dd process (or set the PID environment variable to the process ID).
If dd was the last command you ran, then you can get the PID with the special $! variable, otherwise you’ll have to use ps to find the PID.

Avocent Cyclades ACS console server password reset or reset unit factory defaults

Saturday, November 6th, 2010

The Avocent Cycaldes ACS console servers are great little units that run Linux and even give you full root console access. The root password is “tslinux” by default, but if it has been changed then you can boot the unit into single user mode by supplying the argument “single” to the Linux kernel selection during the boot process (make sure you put a space between the existing Kernel parameters and “single”) which will drop you to a root prompt.

On my unit, this line comes up as right at the start of the boot process:

Linux/PPC load: root=/dev/ram ramdisk=0x0001F000

So you would type ” single” (remember the space!) to give you:

Linux/PPC load: root=/dev/ram ramdisk=0x0001F000 single

Then just hit enter and the unit will boot up into single user mode and give you the root prompt.

At this point, if you want to restore the entire unit to the factory default settings which will erase all of the configuration, then just run “defconf” and then reboot the unit.

If you want to keep the existing configuration intact but just reset the password then you can just use the traditional Linux passwd tool to edit /etc/passwd:

[root@(none) /]# passwd
New password:
Re-enter new password:
Password changed
[root@(none) /]# saveconf
Checking the configuration file list…
Compressing configuration files into /tmp/saving_config.tar.gz … done.
Saving configuration files to flash … done.
[root@(none) /]# reboot
[root@(none) /]# Restarting system.

Cisco DHCP snooping with a Cisco DHCP relay (ip helper) and DHCP option-82

Wednesday, November 3rd, 2010

By default, the Cisco DHCP snooping code on the Cisco Catalyst switches inserts option-82 into the DHCP packet but sets giaddr to, which causes the Cisco DHCP relay (ip helper) to drop all DHCP packets from a Cisco switch configured with DHCP snooping.

To work around this, you can either disable the insertion of Option-82 on the switch performing the DHCP snooping with:

no ip dhcp snooping information option

Or alternatively you can configure the Cisco device acting as the DHCP relay to trust DHCP packets with giaddr set to This can either be done on all interfaces with the global command

ip dhcp relay information trust-all

Or on a per-interface basis with

ip dhcp relay information trusted

Remember, if you are applying the trust to a specific interface then it has to be the layer 3 interface with the IP helper on it (such as an SVI) and not the layer 2 interface that the DHCP packets are received on.