Tuesday, February 8, 2011

dd surprise

I was testing the speed of external USB harddrives and ran across something that surprised me.  I have assumed for a while that increasing the block size while doing a dd improved throughput but I tested anyway, and it didn't.  Here are the figures for not specifying block size, and then using 500k, 1m, and 500m:
 10,460,172 bytes/sec
 10,385,009 bytes/sec bs=500k
 10,529,657 bytes/sec bs=1m
  9,573,095 bytes/sec bs=500m
Looking at the overall speed of USB 2 (it's 480Mbps or 62,914,560 bytes/sec), it appears that it's USB that is the limit in this case.  We're getting not quite 20% of theoretical.  This on a MacBook Pro running Snow Leopard.

Tuesday, February 1, 2011

Applescripting notes

I wish i had more time to learn about Applescript as there are a bunch of things i'd like to do with it...  One thing i've done is create this small script to unmount volumes and put my MacBook Pro to sleep:
tell application "Finder"
    eject (every disk whose ejectable is true)
    sleep
end tell
I have a Hendge dock for it (http://www.hengedocks.com/) to save all the plugging and unplugging, but at the end of the day, i wanted something to unmount and sleep.
So, run the AppleScript Editor and develop or paste what you want.  Click "Compile".  Do a "Save As" and save it to your home directory's Library/Scripts directory with a name such as "Eject and Sleep".
Then, you can also map a key to it: System Preferences, Keyboard, Keyboard Shortcuts.  Choose Application Shortcuts, click '+'.  Choose All Applications, Menu Title: Eject and Sleep, or whatever you typed before, and end the key combination you'd like...
Another thing one can map are "Services" on object such as directories.  So, if you can left click on a folder and there is something listed under Services, you can create a keyboard shortcut for it.  Here are two images demonstrating that.


Friday, January 28, 2011

Hugin, great with strange errors...

I love hugin (http://hugin.sourceforge.net/) -- it does a great job of stitching pictures together to make a panorama.  I ran into a weird problem -- i kept getting "unconnected image group" errors.  I tried setting the control point generators (not strictly need in the latest version) but each reported "Configured, not installed".  Strange.  The problem turned out to be that i installed hugin in a subdirectory of /Applications on my Mac and it didn't much like that.  Moved it to /Applications and all was well...

Here's an example panorama from photos I took at Canyonlands National Park outside of Moab Utah.

OSX, Xnest, and the keyboard

It seems many people have found out like i did that Xnest doesn't work if the client is an OSX machine -- the keyboard doesn't work properly.  I also tried a non-Apple keyboard but no happiness...  My workaround?  The free version of nomachine (http://www.nomachine.com/) -- works like a charm.  The weird thing is, nomachine uses ssh and X11 just like ssh/Xnest does, but it fixes the keyboard problem.

Monday, January 3, 2011

Upgrade to FC14 and NIC troubles

While upgrading to FC14, the motherboard NIC on one of my machines completely disappeared.  Happily, I had a spare PCI NIC and that worked fine, so I was able to fix things while have network access.  Lots of things were actually wrong.  The motherboard is entitled 'DQ965', well 'DQ965CO' in its full glory.  The NIC is a '82566DM Gigabit Network Connection'.  One needs to download a driver from Intel; the one I grabbed was entitled 'e1000e-1.2.20'.  A typical 'make install' should have worked, but Fedora (I suppose correctly) took itself from i386 to i686.PAE and the kernel sources didn't come along.  So, I had to 'yum install kernel-PAE-devel' to get the correct headers.  Then 'make install' in the e1000e source directory worked.  It also took BOTH the 'acpi=off' and 'pcie_aspm=off' kernel arguments. For more discussion around this, see https://bugzilla.redhat.com/show_bug.cgi?id=649570

All that said, I have to rebuild and reinstall after each kernel update. See bug at http://sourceforge.net/tracker/index.php?func=detail&aid=3116036&group_id=42302&atid=447449

Wednesday, December 22, 2010

Old BIOS, external USB drives, and Linux

In order to boot an Ubuntu machine with external drives, I had to go in to the BIOS and disable both "High-speed USB" and "Legacy USB support".  The OS has no problem detecting the devices once it is booted up...