August 31, 2008

Attack of the mutant slug from the fourth dimension

I went to buy some parts at my network dealer and they had the Linksys NSLU2 in stock. Wow! I've heard many good things about the NSLU2 but have never had one because they were never available locally. So I bought one immediately.

Loading the Unslung firmware (and voiding the warranty) was relatively easy. One issue I ran into was that eventhough the NSLU2-Linux website and wiki are very complete, they are not always updated to reflect changes in developement, and there are a lot of duplicate pages filled with conflicting information created by different people at different times of the firmware's development process. It is not easy for a newcomer to the NSLU2 "scene" to find the right information to get started.

I didn't have any projects in mind for the NSLU2 when I bought it, but I happened to need a USB printer server and was never able to find a good one. In fact, I was looking at buying some USB-capable wireless routers such as the ASUS WL-520gU and load it with Oleg's firmware to turn it into printer server. So I decided to turn the NSLU2 into a USB printer server by using CUPS.

Which turned out to be a good choice. After running CUPS for a bit, I realized that all the USB print servers I had previously as well as Oleg's firmware use p910nd, which appears to simply forward all data it receives from the LAN directly to the USB port, which causes all kinds of weird issues and random lockups. CUPS, on the other hand, works differently by spooling the files locally then sending them to the printer, which can be seen by the ability to cancel or move jobs directly from the CUPS web interface. So buying the NSLU2 turned out to be a good choice after all.

But after using the NSLU2 + CUPS for an hour "in production", I immediately ran into a new issue. When the USB printer is turned off, or if the NSLU2 is powered on before the printer, the printer appears to be unplugged from the NSLU2. If CUPS receives a new print job at this point, it has no way to turn on the printer by itself, so it just stops the printer queue and holds onto the job, and the web interface returns the error: "Unable to open device file "/dev/lp": No such device". Unfortunately, turning on the printer manually at this point doesn't automatically make CUPS restart the job queue, and I had to manually restart the printer from the web interface or from the shell.

A lot of googling and reading the hopelessly confusing wiki all seem to point to one conclusion: I need to have the hotplug package, which doesn't seem to be available in Unslung. So while I was contemplating the installation of SlugOS, the printer suddenly came to life and the stuck print job came out. Magic! So while it's not like having a hotplug event that automatically resumes the print job immediately, at least it resumes, and everyone is happy.

Update: Turns out that the Canon printers we use have an auto-power on feature that turns the printer on when it receives a print job. It just happens the one printer I used for testing the NSLU2 and CUPS earlier was a new printer just taken out of the box and had not yet had the auto-power on function enabled. When the auto-power on feature is enabled, the printer automatically works without CUPS complaining or giving any errors. Yay!

August 28, 2008

Slashdot effect

No, I didn't actually make /. but it appears like there was a lot of interest in the EOS 50D before its official release. Those leaked sample pics I posted in the last entry got downloaded more than 2,500 times within a day. Total traffic usage was about 3 GB.

This was nothing compared to September last year when the EOS 40D was released though. After the 40D was released, for some reason the PDF manual wasn't available for download, so someone posted a scanned copy of his manual, and I offered to mirror it. The PDF manual was downloaded more than 10,000 times within a day. The file was a large 25 MB and the traffic usage came to nearly 30 GB. (I wonder how many downloads he got and whether his ISP caught fire?) When the official PDF manual (less than 6 MB) was released a few days later I deleted the file thinking that people could just go download the official one. Unfortunately, I didn't expect hundreds of other sites linking to me, and I got a massive number of 404's. I imagine if I hadn't deleted the file, I would've gotten way more downloads.

Always nice to have unlimited bandwidth.

August 24, 2008

Canon EOS 50D

(Update 8/26/2008): EOS 50D is officially announced. You can now download the full size samples at the official site here.







Click on the images to see the originals. Bandwidth warning: the photos are 15 megapixels.

Hmm, time to upgrade my camera.

See you in London 2012

The 2008 Beijing Olympics ended after 16 days. The closing ceremonies was as spectacular as the opening ceremonies. I was a bit disappointed that my favorite singer, Stefanie Sun, didn't make an appearance even though she was supposed to. Or maybe she was standing behind all the other megastars.

Congrats to all the athletes! And to all the people that worked hard behind the scenes, a job well done! I know someone who is a military police in Beijing and he worked 24-hour shifts for almost a whole year leading up to the Olympics.

I also know a lot of Chinese and all they seem to know how to do is complain that the added security during Olympics is giving them trouble in bringing foreign snacks back home to China and moan that the government is blowing money away on showing off. In fact, hosting the Olympics brings in huge revenues as well as improving the overall infrastructure of the country. Oh right, the money isn't flowing directly into their pockets.

August 23, 2008

Work less and spend more time with your loved ones

(Click on the play button to play the embedded video.)



Today is the second anniversary of my dad's passing. My dad passed away suddenly two years ago just weeks before my wedding. What really broke my heart though, was that both Father's Day and Mother's Day fall in August and I had made plans earlier with my parents to go out and spend two whole days together, but then my server had a hard drive problem, so I moved the date to the end of the month and spent the long weekend working.

Time is never enough for a sysadmin, but now I try to spend as much time as possible with my family. If you are reading this, take a moment to call up your loved ones, take the weekend off and spend time with them, buy a book on time management and read it. Do something, before it's too late.

P.S. Takuya Kimura is not my dad.

August 18, 2008

Google AdSense

When I first created this blog I moved it from Blogger to Wordpress then back to Blogger again. Both are free and offer similar features for a casual blogger like me, but I wanted to use Wordpress because I could use a shorter name ("ivoid"). Unfortunately, Wordpress doesn't allow the use of Google AdSense with free accounts, so I came back to Blogger again.

According to the Google AdSense policy, I'm strictly prohibited from clicking on the ads placed on my own site. Unfortunately, because I always write about things I like, the targeted ads that appear are always things I'm really interested in, and I can't click on them and I had no idea how to reach the advertised sites. Eventually I found a silly way around this by enlarging the ads so they'll show the advertiser's URL, and I just manually type in the URL without clicking on the ads. (Which is why the ads are so big.)

Besides the ads that I'm actually interested in, I'm also getting a lot of Scientology ads. I bet they'll double now that I've actually mentioned them in a post.

I've heard horror stories about people being dropped from the AdSense program due to invalid clicks. I'm really worried about this because I have an absurdly high Page CTR (click through rate) on one of my sites, probably because people visit the site to look for the particular product that we sell (almost all visitors found the site by Google search), and then click on the ads to find more similar sites.

I'm also not supposed to encourage people to click on the ads, so please, don't click on the ads! :-)