Wednesday, October 10, 2012

Logging STDOUT, STDERR and outputting STDERR

You may find yourself with the need to log both STDOUT and STDERR but also display STDERR. A perfect example is when running cronjobs on Linux. As we all know getting too many notifications will result in the important notifications being lost in the noise. The solution is generally only to show errors. The problem is that those errors might lose context without various debug information. This is where I/O redirection becomes handy. Because we only want to receive emails (cron automatically sends all STD output as an email to the job owner) for errors we can use the following:

<command> 2>&1 >>blah.log | tee -a blah.log

What this does is runs <command> and copies STDERR (file descriptor 2) to STDOUT (file descriptor  1, 2>&1) and then redirects (>>) STDOUT (file descriptor 1) to blah.log.  Because of the order STDERR is not being appended to the blah.log.   That happens in the pipe to the tee command.  The tee command takes input from STDIN, adds it to a file and then echos that output to STDOUT.  The net result is that we now have STDERR from <command> being emailed to us should we use that series of commands in a cronjob.

Friday, April 13, 2012

BlueHarbor Auto Refinance Ripoff

Do not waste your time trying to refinance through BlueHarbor Auto.  You'll give them all your information and they will secure you a good rate and then tell you about all the "fees" involved in completing the loan.  $199 financing fee.  Ok, everyone charges those.  $87.50 re-titling fee.  HUH?  Oh and btw, you have to sign up for our extended service contract on the vehicle.  At this point I told them I was no longer interested in their services.  I found this company on  I really do not think that Bankrate knows that this company is trying to rip people off to save a few points on a loan.  I'm going to be contacting them.  If they don't do anything about it I'd say it's safe to assume that Bankrate has gone down the tubes.


I guess one good thing came out of this situation.  I discovered Pentagon Federal Credit Union.  They had better rates than the above mentioned and their customer service is incredibly helpful and courteous.  Also, the entire application for membership ($5) and the loan (free) are handled online.  After a couple days my loan (refinance) was approved and I had the pay-off check for the current lender.

Thursday, April 5, 2012

AR.Drone 2.0

I received my AR.Drone 2.0 the other day and had a chance to play around with it a bit.  The biggest problem I see with the device is the horrible battery life and they have not released AR.Free Flight 2.0 for Android devices yet.  AR.Free Flight 1.9 does work fine with the AR.Drone 2.0 but there is no video support and FF 1.9 doesn't support the 2.0 feature of using the "Absolute Control" mode.  If you use the accelerometer with 1.9 you must keep the camera pointing forward to have the drone respond intuitively.  For now I'm just using it in 2 stick mode.  Here are some pictures of the un-boxing.

Here is a video of my second flight with the device.  It isn't very long because I'd already played with it a bit and the battery was nearly dead:

If you have any questions let me know.

Additional close up photos of the battery:

Added another short video of flying the AR.Drone 2.0 with AR. Free Flight 2.0 on a borrowed iPhone.  I used Absolute Control which is awesome.

Wednesday, January 25, 2012

Six hours spent trying to install Linux Mint 12.

I've been using Linux on the desktop for about 18 years now and needless to say I know my way around pretty well. I've been using Ubuntu 10.04 LTS for the last year or so and recently upgraded to two new drives on my work system. Rather than reinstalling 10.04 LTS I decided to give Linux Mint 12 a try. The catch is that I wanted to do software RAID 1 for the boot partition and RAID 0 for the system. Ubuntu allows software RAID configuration using its alternate installation media and Linux Mint (although initially based on Ubuntu) doesn't provide an alternate install. I found a guide on the Linux Mint forums which can be followed to manually configure software RAID during installation. Linux Mint's immaturity as an OS reared it's ugly head when I neared the end of the install and the installer wouldn't let me proceed. Long story short I ended up installing Ubuntu 11.10 using the alternate install media and had a software RAID system up and running in about 20 minutes.