jQuery PXE FreeBoo Munin Irrlicht Squid Solaris-Zones JOURNAL Since 1994: The Original Magazine of the Linux Community APRIL 2009 | ISSUE 180 Run Linux and Solaris on One Machine Build an Unattended Network-Based OS Installer with PXE Use FreeBoo to Restore and Boot Build a Secure Squid Web Proxy ADMNSTRATION Program 3-D Graphics with Irrlicht Monitor Anything with Munin How to Bring Back a Master Boot Record PLUS POINT/COUNTERPOINT: Mutt vs. Thunderbird www.linuxjournal.com S5.99US $5.99C AN UBFQUTTT NETWORKS The Embedded Wireless Dream Machine. 680MHz CPU, 64MB RAM, 16MB Flash, USB, 3 mini-PCI slots, 5A power supply for multiple hi-power radios, and enhanced temperature performance and ESD protection for carrier applications. Full Linux SDK support and a $59 USD MSRP. RouterStation LOTS 0 LOTS H IK SW SH K S3MU13S 0M3 vr & im k 5Nw inohs 6f®r A8»-8t d«d xnv ■ m i-i shw iNfiHS erer 1 UWVJ3Q >°C Z08 30dJ SNOUdO dDMOd u — '« T load **. , «§^g- L ’fffffil a § ~ g S S www.ubnt.com RouterStation Ul Challenge: For Contest Details Visit: www.ubnt.com/challenge Cash Prize $200000 (Two hundred Thousand) USD. CASH PRIZE $200000 User Interface development based on OpenWrt Linux firmware. OpenWrt is a registered trademark of OpenWrt. www.ubnt.com/challenge 3 r y 3 r b ► uJiJ^ 3 \r GO STRAIGHT TO THE SOURCE! MORE PRODUCTS, BETTER SERVICE, GUARANTEED. 1.877.727.78871 www.ServersDirect.com moNS COST EFFECTIVE YOUR HIGH PERFORMANCE COMPUTING HAS ARRIVED. The ServersDirect® Systems with the Intel® Xeon® Processor helps you simplify computing operations, accelerate performance and accomplish more in less time 3 rum ^ rf« w ri ew ®rn a <\ ft s OPTIMIZED FOR SMALL OFFIC 5DP-S4100-TC rLEVEL SERVER MOST COST EFFECTIVE LAN SOLUTION • 300W ■Power Supply • Supermicro Server Boara^itb Intel® 945GC Chipset J2x Realtek RTL8111C-GR Gigabit tAM Ports • Support up to 4x SATA (3.0Gbps) Ports RAID 0, 1,5, 10 •~Md Tower Cj^lssis with 300W Poweh'Sjjoffly • SuperpnlcrcfServer Board with Intjl® 32M^ ICH9R Chipset • Support up to a Duahftace Intel® ^X&%i®3000 Series processor. • SuppoiHrpJo 6xSATA (3.0Gbps) Ports RAID 0, t, 5, 10 STARTING AT $329 • 4x 3.5" internal drive bays STARTING AT $439 • 4x 3.5" internal drive bays SDR-S1208-T00 ™ $559 • Supermicro Mini 1U Rackmount Server with 260W Power Supply • Supermicro Server Board w/lntel® 946GZ Chipset • Support up to a Dual-Core Intel® Xeon® 3000 Series processor • TPM Support • 1x3.5" Internal Drive Bay • 2x Intel® 82573 PCI-e Gigabit LAN Port SDR-C1303-T02 ““$899 • 1U Rackmount Server with 400W Power Supply • Supermicro Server Board w/ Intel® 5100 Chipset • Support Dual Intel® 64-bit Xeon® Quad-Core or Dual-Core • Support up to 48GB 667/533MHZ DDR2 ECC Reg • 2x 3.5" Hot-swap SATA Drive Bay • Intel® 82573V & 82573L Gigabit Ethernet Controller SDR-C2301-T06 $999 • 2U Rackmount Server with 460W Power Supply • Supermicro Server Board w/ Intel® 5100 Chipset • Support Dual Intel® 64-bit Xeon® Quad-Core or Dual-Core • Support up to 48GB 667/533MHZ DDR2 ECC Reg • 6x 3.5" Hot-swap SATA Drive Bay • Intel® 82573V & 82573L Gigabit Ethernet Controller • 81) Chassis with 1350W Redundant Power Supply • Supermicro Server Board w/ Intel® 5400 Chipset • Support Dual Intel® 64-bit Xeon® Quad-Core or Dual-Core • Support up to 64GB SDRAM Fully Buffered DIMM (FB-DIMM) • 42 x 3.5"lnternal SATA Drives Trays • Dual-port Gigabit Ethernet Controller SERVERS DIRECT CAN HELP YOU CONFIGURE YOUR NEXT HIGH PERFORMANCE SERVER SYSTEM - CALL US TODAY! Our flexible on-line products configurator allows you to source a custom solution, or call and our product experts are standing by to help you assemble systems that require a little extra. Servers Direct - your direct source for scalable, cost effective server solutions. 1.877.727.7887 | www.ServersDirect.com Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel SpeedStep, Itanium, Pentium, and Pentium III Xeon are trademarks of Intel Corporation or it’s subsidiaries in the United States and other countries. Xeon* inside ™ Dual-core. Do more. • 3U Rackmount Server with 650W Power Supply • Supermicro Server Board w/ Intel® 5100 Chipset • Dual Intel® 64-bit Xeon® Quad-Core or Dual-Core • Support up to 48GB 667/533MHZ DDR2 ECC Reg • 16 x 3.5" Hot-swap SATA Drives Trays • Dual-port Gigabit Ethernet Controller • 4U Rackmount Server with 600W Power Supply • Supermicro Server Board w/ Intel® 5100 Chipset • Support Dual Intel® 64-bit Xeon® Quad-Core or Dual-Core • Support up to 48GB 667/533MHZ DDR2 ECC Reg • 3 x 3.5"Internal SATA Drives Trays • Dual-port Gigabit Ethernet Controller CONTENTS APRIL 2009 Issue 180 ADMNSTRATION FEATURES 50 PXE: NOT JUST FOR SERVER NETWORKS ANYMORE! Build a Windows install server...using Linux! Bill Childers FREEBOO: AN OPEN ARCHITECTURE FOR NETWORK DUAL BOOT Open-source network restore and boot. Cristina Barrado and Sebastian Galiano MUNIN—THE RAVEN REPORTS Monitor anything, not just system parameters. Patricia Jung ON THE COVER • Run Linux and Solaris on One Machine, p. 68 • Build an Unattended Network-Based OS Installer with PXE, p. 50 • Use FreeBoo to Restore and Boot, p. 56 • Build a Secure Squid Web Proxy, p. 36 • Program 3-D Graphics with Irrlicht, p. 73 • Monitor Anything with Munin, p. 62 • How to Bring Back a Master Boot Record, p. 40 • Point/Counterpoint: Mutt vs. Thunderbird, p. 77 System Architecture I 56 2 | april 2009 www. linuxj ournal.com Systems zt ZT Systems delivers something different: a unique BALANCE of world-class server performance and cost advantage joined with extensive flexibility in delivery and support From the small office to the mega-datacenter, ZT Systems provides dependable, energy efficient server and client solutions that maximize productivity and optimize your IT budget. An established manufacturer celebrating our 15th anniversary, ZT combines individualized attention to your requirements with the experience and scalability you demand. All ZT Systems are assembled and serviced in the USA. Choose ZT Systems and get: • Custom Configurations • Professional Grade Quality • Personalized Account Service • Superior Value Xeorf inside ” Powerful. Efficient. Scalable Custom Server Solutions - Contact Us to Learn More (866) 984-7687 corpsales@ztsystems.com Intel, the Intel logo, Xeon, Intel Core, Xeon Inside and Core Inside are trademarks or registered trademarks of Intel Corporation in the U.S. and other countries. CONTENTS APRIL 2009 Issue 180 COLUMNS 10 SHAWN POWERS’ CURRENT_ISSUE.TAR.GZ Fixing Starships, Transporters and Even Computers 22 REUVEN M. LERNER'S AT THE FORGE Writing jQuery Plugins 26 MARCEL GAGNE'S COOKING WITH LINUX Backing Up to the Clouds 32 DAVE TAYLOR’S WORK THE SHELL More Fun with Word and Letter Counts 36 MICK BAUER'S PARANOID PENGUIN Building a Secure Squid Web Proxy, Part I 40 KYLE RANKIN'S HACK AND / When Disaster Strikes: Scratching the Master Boot Record 77 KYLE RANKIN AND BILL CHILDER S POINT/COUNTERPOINT Mutt vs. Thunderbird 80 DOCSEARLS' EOF Exchanging Exchange INDEPTH 68 SOLARIS-ZONES: LINUX IT MARBLES GET A NEW BAG Run Linux and Solaris on the same machine. Victor Burns 73 3-D GRAPHICS PROGRAMMING WITH IRRLICHT 3-D graphics programming—not just for geniuses anymore! Mike Diehl IN EVERY ISSUE 10 FROM THE EDITOR 12 LETTERS 16 UPFRONT 44 NEW PRODUCTS 46 NEW PROJECTS 65 ADVERTISERS INDEX 46 NEW PROJECTS: EDITRA Next Month COOL PROJECTS Here at LJ, we hardly even get excited anymore when somebody mentions a new project that uses Linux, but that's not the case with these Cool Projects. We've got Linux running an un-manned submarine and rocket, and if that doesn't get your BP up, you may already be dead. If it's all too much for you, don't worry; we've got articles for the weak heart types also—articles on setting up home control and home surveillance systems. Plus, one on converting your old 8mm movies so that you can sit back and reminisce about the days when you weren't almost dead. If you still have doubts about the ultimate success of Linux and open source, don't miss our upcoming interview with Neuros Technology CEO and founder Joe Born. Find out how open source concepts transformed his company. If his statements don't convince you, you definitely are already dead USPS LINUX JOURNAL (ISSN 1075-3583) (USPS 12854) is published monthly by Belltown Media, Inc., 2211 Norfolk, Ste 514, Houston, IX 77098 USA. Periodicals postage paid at Houston, Texas and at additional mail¬ ing offices. Cover price is $5.99 US. Subscription rate is $29.50/year in the United States, $39.50 in Canada and Mexico, $69.50 elsewhere. POSTMASTER: Please send address changes to Linux Journal, PO Box 16476, North Hollywood, CA 91615. Subscriptions start with the next issue. Canada Post: Publications Mail Agreement #41549519. Canada Returns to be sent to Bleuchip International, P.O. Box 25542, London, ON N6C 6B2 4 | april 2009 www.linuxjournal.com Experience Lightning Without The Thunderi Whether it’s Wall Street, Main Street or Your Street, Microway’s new Nvidia-powered WhisperStation-Pro is energy-efficient, designed for superior performance, and best of all - QUIET. Originally designed for a group of power hungry, demanding engineers in the automotive industry, WhisperStation-Pro incorporates two AMD® Opteron™ or Intel® Xeon® quad-core processors and high-efficiency power supplies. Ultra-quiet fans and internal sound-proofing produce a powerful, but silent, computational platform. WhisperStation-Pro configured with one Quad core processor, 4 GB high speed memory, 250 GB drive, dual-GigE, NVIDIA® Quadro™ FX570 graphics and 20" LCD - starts at $1995. You can have it configured to your exact needs with NVIDIA GeForce® or Quadro graphics adapters (including SLI®), NVIDIA Tesla™ GPU, any Linux distribution, or Windows® dual-boot. Also, there is plenty of room for RAID storage expansion. From a home based workstation for financial wizards, to a superior gaming or design station, WhisperStation-Pro fits the bill and your budget. Visit www.microway.com for more technical information. Hear Yourself Think Again! Call our technical sales team at 508-746-7341 and customize your WhisperStation-Pro today. WhisperStation™ © 3D Elite SLI For Gamers ZMicroway Technology you can count on™ m LINUX JOURNAL Since 1994: The Original Magazine of the Linux Community Digital Edition Now Available! Read it first Get the latest issue before it hits the newsstand Keyword searchable Find a topic or name in seconds LINUX JOURNAL Executive Editor Jill Franklin jill@linuxjournal.com Senior Editor Doc Searls doc@linuxjournal.com Associate Editor Shawn Powers shawn@linuxjournal.com Associate Editor Mitch Frazier mitch@linuxjournal.com Art Director Garrick Antikajian garrick@linuxjournal.com Products Editor James Gray newproducts@linuxjournal.com Editor Emeritus Don Marti dmarti@linuxjournal.com Technical Editor Michael Baxter mab@cruzio.com Senior Columnist Reuven Lerner reuven@lerner.co.il Chef Fran^ais Marcel Gagne mggagne@salmar.com Security Editor Mick Bauer mick@visi.com Hack Editor Kyle Rankin lj@greenfly.net Contributing Editors David A. Bandel • Ibrahim Haddad • Robert Love • Zack Brown • Dave Phillips • Marco Fioretti Ludovic Marcotte • Paul Barry • Paul McKenney • Dave Taylor • Dirk Elmendorf Paperless archives Download to your computer for convenient offline reading Same great magazine Read each issue in high-quality PDF Try a Sample Issue! www.linuxjournal.com/digital '— .7 T . 'tV M ■ fZ> TZr fV Proofreader Geri Gale Publisher Carlie Fairchild publisher@linuxjournal.com General Manager Rebecca Cassity rebecca@linuxjournal.com Sales Manager Sales and Marketing Coordinator Joseph Krack joseph@linuxjournal.com Tracy Manford tracy@linuxjournal.com Associate Publisher Mark Irgang mark@linuxjournal.com Webmistress Katherine Druckman webmistress@linuxjournal.com Accountant Candy Beauchamp acct@linuxjournal.com Linux Journal is published by, and is a registered trade name of, Belltown Media, Inc. PO Box 980985, Houston, TX 77098 USA Reader Advisory Panel Brad Abram Baillio • Nick Baronian • Hari Boukis • Caleb S. Cullen • Steve Case Kalyana Krishna Chadalavada • Keir Davis • Adam M. Dutko • Michael Eager • Nick Faltys • Ken Firestone Dennis Franklin Frey • Victor Gregorio • Kristian Erik • Hermansen • Philip Jacob • Jay Kruizenga David A. Lane • Steve Marquez • Dave McAllister • Craig Oda • Rob Orsini • Jeffrey D. Parent Wayne D. Powel • Shawn Powers • Mike Roberts • Draciron Smith • Chris D. Stark • Patrick Swartz Editorial Advisory Board Daniel Frye, Director, IBM Linux Technology Center Jon "maddog" Hall, President, Linux International Lawrence Lessig, Professor of Law, Stanford University Ransom Love, Director of Strategic Relationships, Family and Church History Department, Church of Jesus Christ of Latter-day Saints Sam Ockman Bruce Perens Bdale Garbee, Linux CTO, HP Danese Cooper, Open Source Diva, Intel Corporation Advertising E-MAIL: ads@linuxjournal.com URL: www.linuxjournal.com/advertising PHONE: +1 713-344-1956 ext. 2 Subscriptions E-MAIL: subs@linuxjournal.com URL: www.linuxjournal.com/subscribe PHONE: +1 818-487-2089 FAX: +1 818-487-4550 TOLL-FREE: 1-888-66-LINUX MAIL: PO Box 16476, North Hollywood, CA 91615-9911 USA Please allow 4-6 weeks for processing address changes and orders PRINTED IN USA LINUX is a registered trademark of Linus Torvalds. PRINTED WITH SOY INK <& EtherDrive* The AFFORDABLE Network Storage Fibre Channel speeds at Ethernet prices! Is your budget shrinking while your network storage needs are growing? Are you suffering from “sticker shock” induced by expensive Fibre Channel and iSCSI storage area network solutions? EtherDrive® SAN solutions offer Fibre Channel speeds at Ethernet prices! Starting at just $1,995 for a 4TB system, EtherDrive® is the affordable storage area network solution. With sustained access speeds from 200MBytes/sec to over 600MBytes/sec, EtherDrive® SAN solutions are fast. From a 4TB single storage appliance to multi-PetaByte system by simply adding more storage appliances, EtherDrive® SAN solutions are scalable. From a single storage appliance to a network of sophisticated virtualized storage LUNs, EtherDrive® SAN solutions embrace virtualization. Coupling Ethernet technology with SATA hard disk drives, EtherDrive® SAN solutions exploit commodity components to deliver affordable, fast storage area network solutions that keep more green in your wallet! Whether you use your own SATA compliant disk drives or our certified enterprise class disk drives, you are in control! EtherDrive® SAN solutions accept standard SATA hard disk drives. Ethernet and SATA disk drives - two proven technologies in one affordable, fast storage area network solution - EtherDrive®. EtherDrive® SAN solutions use the open ATA-over-Ethemet (AoE) lightweight network storage protocol. Simple. Easy to understand. Easy to use. AoE uses Ethernet to transport ATA disk commands without the burden of TCP/IP overhead, thereby enabling disk drives to become AoE devices connected directly to an Ethernet network. An AoE device can be a single physical disk or a logical device made up of multiple disks. An EtherDrive® SAN appliance is an AoE target device. Finally, an affordable, fast storage area network solution for your VMware® ESX 3.5 installation. The EtherDrive® VMware ESX Host Bus Adapter empowers ESX with AoE technology to deliver EtherDrive® SAN solutions for your VMware ESX 3.5 installation. Shipping EtherDrive® RAID solutions since 2004, Coraid boasts thousands of satisfied customers spanning a broad spectrum of the market including enterprise, government, educational institutions, and hosting service providers. Call today to order your EtherDrive® solution, and join the ranks of our thousands of satisfied customers! Call 1.877.548.7200 or visit our website at www.coraid.com International: +1.706.548.7200 CORAID =h « I technology alliance 5 vmware | PARTN g E y R ESX 3.5 compatible EtherDrive® HBA © 2009 Coraid Inc. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. Limited Time Offer: Get 50% off and more for the first 6 months when you sign up for a 1 year plan! Visitwww.1and1.com i for details! need for MEMBER OF united internet 1-877-GO-1AND1 successful website DOMAIN NAMES Register your business website and save! Protect your personal information - private domain registration is included for FREE! .biz domains $|>>997year now $3.99/first year* i The 1&1 Business Package gives you everything you need for a professional website. 3 domains, site-building tool, 2,500 e-mail accounts, search advertising vouchers and more! Starting at $9^9/ifTonth now $4.99/mo .* (first 6 months) j 50 % m° t f PREMIUM SERVERS Designed specifically for high performance needs, these top-of-the-line AMD™ processors feature energy efficient technology, reducing costs and environmental k impact with increased performance-per-watt. 1&1 matches 100% of the energy consumed in our data center with Renewable Energy Certificates. Starting at $195*997month now $99.99/mo .* (first 6 months) 4 50 % Off Current_lssue.tar.gz A SHAWN POWERS Fixing Starships, Transporters and Even Computers A s a system administrator, it reassures me when I see the computer systems break in Star Trek episodes. The reason it brings me peace of mind is that I know if I perfect human cloning and mind transfer, my sysadmin skills still will be useful in a few thousand years. Also, I'm fairly certain Data (the android Lieutenant) must be running some sort of embedded Linux, so my particular skill set will be very much in demand. I'm getting a little ahead of myself, however. Although I'm sure system administration will be a popular topic in future millennia, with this issue of Linux Journal, you hold the future in your hands right now. Cheesy anecdotes aside, this month we have tons of articles and columns to help you keep the packets flowing. Because most system administration begins with installing an operating system, it seems appropriate to start there. We've got a couple really interesting articles this month that deal with both system installing and system restoring. Bill Childers tells us how to leverage PXE network booting to install operating systems (even Windows!) by using a remote booted Linux kernel. Once you understand the nuances of PXE booting, it's amazing the things you can do without even a local boot device. Add to that Christina Barrado and Sebastian Galiano's article on FreeBoo, and you'll be able to install, restore and dual boot in no time (or at least, in less time than with conventional methods). FreeBoo is an open-source alternative to programs like Rembo. Using PXE and FreeBoo will make booting and restoring multiple operating systems much easier than ever before. Once your systems are up and running, it's the system administrator's job to keep them that way. Applications such as Munin can keep track of long¬ term trends. In fact, Munin can keep track of more than just system logs, and Patricia Jung tells us all about it. Whether you use Munin, or you just grep system logs, when the inevitable problem comes along, it's important to know what to do. And, Kyle Rankin explains how to salvage a hard drive when the mysterious Master Boot Record fails. Thankfully, he goes into a little more detail than the standard Windows answer. Sometimes, fdisk /mbr isn't enough. GRUB is a bit more robust than that, thank you very much. Victor Burns shows us an intriguing new method for dual booting between Linux and Solaris. No, I'm not talking about full virtualization or standard dual booting, I'm talking about running both at the same time. With Solaris-Zones, you really can have the best of both worlds. Speaking of both worlds, Bill and Kyle hash it out again this month. This time, it's with e-mail clients. I won't say Bill is GUI, but he sure prefers it in an e-mail client. If you add our regular cast of columnists to this issue, you'll see it's quite a great month to be a Linux Journal subscriber. Mick Bauer shows us how to set up the Squid Web proxy securely. Dave Taylor hones our scripting skills, and Marcel Gagne shows us one of the most important things a system administrator can do—back up. If you're not a sysadmin, don't worry about being left out this month. Even though we all need to administer our own systems to some degree, we've also got information that will appeal to those readers without racks of servers to manage. Mike Diehl teaches us how to program using Irrlicht to get some awesome 3-D graphics in our programs. Reuven M. Lerner shows us how to write plugins for jQuery. Plus, we have tech tips, new product information and news from the Linux industry that is bound to tickle the fancy of any Penguin fan. Perhaps none of us might be around when it's time to do tech support for Galaxy-class starships. It's unlikely we'll be able to debug code for a holodeck any time soon. And, to be honest, I don't expect to get a call requesting my help in program¬ ming any interstellar guidance systems. I think it's a fair guess, however, that when the time does come, most of the devices will be running the Linux kernel. If we practice now, perhaps we'll be ready if the time comes sooner than I expect. Or, if we get visited in a time-travel episode. Admittedly though, the latter is probably unlikely.* Shawn Powers is the Associate Editor for Linux Journal. He’s also the Gadget Guy for LinuxJournal.com, and he has an interesting collection of vintage Garfield coffee mugs. Don’t let his silly hairdo fool you, he’s a pretty ordinary guy and can be reached via e-mail at shawn@linuxjournal.com. Or, swing by the #linuxjournal IRC channel on Freenode.net. 1 0 | april 2009 www.linuxjournal.com Polywell Linux Solutions More Choices, Excellent Service, Great Value! Serving the Industry for More Than 20 Years Netdisk 8000V Quiet Performance NAS Storage The new generation of energy-efficient 45W AMD Athlon™ X2 dual-core processors with Cool'n'Quiet™ technology are designed to enable quiet performance. 4U 24Bay Storage Server AMD Opteron™ Processors 36TB RAID-6 128GB RAM, 4 x GigaLAN Small 1U Server for Data Center ISP i Phenom™ processor 4 to 8GB DDR2-800, 2 x 500GB Linux Server Starts at $499 Polywell OEM Services, Your Virtual Manufacturer Prototype Development with Linux/FreeBSD Support Small Scale to Mass Production Manufacturing Fulfillment, Shipping and RMA Repairs 20 Years of Customer Satisfaction 0&0 7 ^ Cuft; 5-Year Warranty, Industry's Longest i First Class Customer Service linuxsales@polywell.com www.polywell.com/us/Lx OLY 4TB $1,399 8TB $2,399 12TB $2,999 - Dual Gigabit LAN -RAID-5,0,1,10 - Hot Swap, Hot Spare - Linux, Windows, Mac - E-mail Notification - Tower or Rackmount AMD a Athlon X2 Silent Eco Green PC Based on the new 45W AMD® Athlon™ X2 dual-core processor is energy efficient, quiet and has plenty of power, starts at $199 Fanless Silent ITX PC 1G DDR2, 80GB Hard Drive starts at $299 AMD® processor, Low-profile Add-on Available Polywell Computers, Inc 1461 San Mateo Ave.South San Francisco,CA 94080 650.583.7222 Fax:650.583.1974 POLYWELL AMD, AMD Athlon, Phenom, Opteron, Cool'n'Quiet, and combinations thereof are trademarks of Advanced Micro Devices, Inc. Other names are for informational purposes only and may be trademarks of their respective owners. letters Where's the Security? I was surprised in a Linux Journal issue (January 2009) specifically targeting security that the shell script article by Dave Taylor didn't suggest a more secure method of creating temporary filenames other than just using the $$ variable. Adding a little $ {RAN DOM} to the temp directory name and filename, perhaps? Maybe he's going to address that in a later article. Forrest Hudspeth Dave Taylor replies: Great point; Forrest. Since I have limited space in my column , / tend to write short solutions rather than more complicated ones. You're right that something like: tempname="/tmp/appname.$$.${RAND0M}" works better than just a simple applica¬ tion of $$ in terms of making it harder for a hacker to game your temporary files and potentially alter the execution and results of system shell scripts. Lots of Security In my opinion, the January 2009 Security issue was one of the best issues put out in a while, not that the magazine isn't good, but you really outdid yourselves this time in keeping the articles on focus V with the focus of the issue. The one thing I would have liked to see is if Cooking with Linux could have talked about setting up home surveillance cameras in keeping with the Security theme or something of the like. Although I always enjoy Marcel Gagne's articles, I'd like to see him focus on some small-to-medium projects too instead of just games. Mike Laptop Sizes and Great LJ Subscription Service In the January 2009 issue, you have a nice article: "Small Laptops vs. Large Laptops" by Kyle Rankin and Bill Childers. Well, I've worked for several years as a consultant, and I travel a lot, so I can understand the need for a big laptop and also can understand the need and usefulness of a small laptop. But, why not have the best of both worlds? First, I had a big 15" or 17" laptop, and it was great, but then I had to travel, and it wasn't so nice to carry nor was it usable on an airplane, so I bought a small Sony with an 11" monitor. It was nice to have eight hours of battery life, but at the end of the day I was tired, and my head hurt because of the effort to read all the tiny letters. The keyboard was too small, and I spent much time using delete and backspace to correct my errors while programming or writing documentation. So, I bought a 13" display laptop, once again from Sony— an SZ series. Right now, I'm the happi¬ est man in the world with my laptop. It's light (1.5kg), fast, has 2.0MHz dual core and 4GB of RAM. It has a nice hybrid dual video card (one Intel for extreme endurance on battery, and one NVIDIA for games and so on). Nowadays, I think we can have both worlds, being light and small and at the same time, powerful and functional. On another subject, some weeks ago I had a problem with my subscription for Linux Journal, and I didn't get my favorite magazine. I contacted LJ support and they were great. In a week, I had the missing issues (and I live in Portugal). Here's something we all love: real support when you need it, and as with Linux, LJ gives you the best support. Keep up the excellent work! Pedro Pedro , glad you liked Kyle and Bill's new Point/Counterpoint column—see page 77 of this issue for more bickering. — Ed. Reducing Keystrokes Further to Antoine's suggestion to Dave Taylor on reducing keystrokes [see Letters in the January 2009 issue of LJ], note that: pickline=$(( $RANDOM % 250 + 1 )) can be further simplified to be: pickline=$(( RANDOM % 250 + 1 )) It seems that all bash environment variables are expanded within the scope of $(()). Black Jack Shellac More Love for Kyle and Bill Just wanted to drop y'all a line to voice my appreciation for Point/Counterpoint. While Kyle vs. Bill did smack of a rap battle in a few places, it was excellent nonetheless. Keep up the great work, guys! Samuel Ouch! The "Go Green, Save Green with Linux" article [by James Gray, in the April 2008 issue of LJ] carelessly misquotes an incompetently uttered sound bite of Springboard Research: "an average¬ sized server has the same carbon foot¬ print as a mid-sized 4wd taking 17 litres of fuel to travel 100km", said Bob Hayward, Research Vice President for Springboard Research. His comment says nothing. Is he comparing a server to 17 liters of fuel? or a 4wd? Or 100km, walking, flying, driving? Linux Journal butchered this incomprehensible statement into the ludicrous, saying a server has the same footprint as a 4WD vehicle! This is business incompetence 1 2 | april 2009 www.linuxjournal.com The Pavilion: June 1-4, 2009, The Moscone Center, San Francisco, CA The JavaOne™ conference brings together developers, technology enthusiasts, and industry luminaries from around the world. It's your chance to learn, grow, and network with the vast—and growing—technology community. This year's JavaOne conference offers even more opportunity to grow your language skills. You can: • Connect with developers from more than 70 countries • Hear from expert speakers on the hot topics you care about most • Choose from a wide variety of targeted tracks, labs, and BOFs • Get tips and best practices from JavaOne conference Rock Stars and Java technology creators and evangelists • Experience JavaFX™, RIAs, and other groundbreaking technologies—hands-on in our Pavilion Save $200 on Conference registration! Register by April 22 at java.sun.com/javaone Nowadays money's tight. That's why it's more important than ever to attend the one conference that delivers everything you want to see, learn, and experience—all under one big roof. And that's the JavaOne conference. Save Your Spot! Register Today! Cosponsors Media Cosponsors IMTERSYSTEMS & Sony Ericsson ▲ ▼ T Addison Wesley PRENTICE & THE CODE PROJECT •£• WWW CODEPROJECT COM microsystems Media Partners Application Development Trends Extension Media Linux Journal Slashdot.org SourceForge.net Toolbox.com © 2009. All rights reserved. Sun, Sun Microsystems, the Sun logo, Java, JavaFX, and JavaOne are trademarks or registered trademarks of Sun Microsystems, Inc. or its subsidiaries in the United States and other countries. Information subject to change without notice. [LETTERS] stacked on journalism incompetence. Jim Leuba James Gray replies: I personally find Hayward's quote ingenious, which does two things. First, Hayward compares the energy consumption of two very different machines: one whose energy consumption isn't readily apparent (the server) to one that is more publicized (the vehicle). Second, he shows that servers consume more energy than their compact size belies. Hayward's metric of energy consumption is the carbon footprint, which is simply the quantity of carbon dioxide created by the burning of fossil fuels in energy genera¬ tion—pretty straightforward stuff. I can only speculate why you had such a strong emotional reaction to Hayward's quote. My best guess is because it is hard for us human beings to accept that our actions are directly and gravely degrading the health of our planet. It's tough news to hear. Tip This is in reference to David Sinck's Tech Tip in the December 2008 issue. I find the following code a little simpler and also insensitive to file extensions: #!/bin/sh case 'file -b $1 [ cut -d' ' -fl' in Zip|gzip) CAT=zcat ;; bzip2) CAT=bzcat ;; *) CAT=cat ;; esac SCAT $1 As an aside, if one is looking to open the files in an editor, vim makes it easy by opening zip files in various formats. Mayuresh Warunjikar LINUX JOURNAL Fit Your Service MAGAZINE PRINT SUBSCRIPTIONS: Renewing your subscription, changing your address, paying your invoice, viewing your account details or other subscription inquiries can instantly be done on-line, www.linuxjournal.com/subs. Alternatively, within the U.S. and Canada, you may call us toll-free 1-888-66-LINUX (54689), or internationally +1-818-487-2089. E-mail us at subs@linuxjournal.com or reach us via postal mail, Linux Journal, PO Box 16476, North Hollywood, CA 91615-9911 USA. Please remember to include your complete name and address when contacting us. DIGITAL SUBSCRIPTIONS: Digital subscriptions of Linux Journal are now available and delivered as PDFs anywhere in the world for one low cost. Visit www.linuxjournal.com/digital for more information or use the contact information above for any digital magazine customer service inquiries. LETTERS TO THE EDITOR: We welcome your letters and encourage you to submit them at www.linuxjournal.com/contact or mail them to Linux Journal, PO Box 980985, Houston, TX 77098 USA. Letters may be edited for space and clarity. WRITING FOR US: We always are looking for contributed articles, tutorials and real- world stories for the magazine. An author's guide, a list of topics and due dates can be found on-line, www.linuxjournal.com/author. ADVERTISING: Linux Journal is a great resource for readers and advertisers alike. Request a media kit, view our current editorial calendar and advertising due dates, or learn more about other advertising and marketing opportunities by visiting us on-line, www.linuxjournal.com/advertising. Contact us directly for further information, ads@linuxjournal.com or +1 713-344-1956 ext. 2. ON-LINE WEB SITE: Read exclusive on-line-only content on Linux Journal's Web site, www.linuxjournal.com. Also, select articles from the print magazine are available on-line. Magazine subscribers, digital or print, receive full access to issue archives; please contact Customer Service for further information, subs@linuxjournal.com. FREE e-NEWSLETTERS: Each week, Linux Journal editors will tell you what's hot in the world of Linux. Receive late-breaking news, technical tips and tricks, and links to in-depth stories featured on www.linuxjournal.com. Subscribe for free today, www.linuxjournaI.com/enewsletters. V PHOTO OF THE MONTH Have a photo you'd like to share with LJ readers? Send your submission to publisher@linuxjournal.com. If we run yours in the magazine, we'll send you a free T-shirt. Photo submitted by Brenton Leanhardt: “I made this when I was in Colorado for Christmas." 14 | april 2009 www.linuxjournal.com CommunityOne An open developer conference june 1-3 moscone center san francisco u t one heavyweight geek-fest” —Tim Bray, 2008 speaker OK, the economy is bad, but your development choices don't have to follow suit. Whether you're focused on creating robust Web apps, building a scalable infrastructure, or thinking about cloud computing, you'll find sessions on proven free and open-source software (FOSS) technologies and tools. This is stuff you can really get excited about. ister Today! ree; fee required for tutorials on Tuesday and Wednesday. developers.sun.com/events/communityone © 2009 Sun Microsystems, Inc. All rights reserved. Sun, Sun Microsystems, the Sun logo, GlassFish, Java, MySQL, NetBeans, and OpenSolaris are trademarks or registered trademarks of Sun Microsystems, Inc. or its subsidiaries in the United States and other countries. Information subject to change without notice. CommunityOne, 999 Skyway Road, Suite 300, San Carlos, CA 94070 ^Sun microsystems FRONT NEWS + FUN diff -u WHAT’S NEW IN KERNEL DEVELOPMENT The kernel boot process is one of the strangest parts of the whole operating system. One aspect of it is initramfs, where the kernel must first boot up in a RAM-based root filesystem, before it can mount the disk-based filesystems and transition the kernel to consider those the root filesystem, initramfs traditionally has not been part of the official kernel, so each Linux distribution has come to maintain its own unique implementation. In general, this means the sequence of events in the boot process of each distribution is different. This can affect the way hardware is initialized and the state it's in when the user finally sees a login prompt. Jeremy Katz recently announced Dracut, a new distribution-indepen- dent implementation of initramfs, inspired by discussions at the most recent Kernel Summit. The project's goal is to simplify and standardize the boot process and move the initramfs implementation into the official kernel tree. Each Linux distribution then would boot up identically, but would be able to layer any additional func¬ tionality on top of the main initramfs implementation. Jeremy's work is based on the Red Hat initramfs. Hannes Reinecke is working on his own implementation, based on OpenSUSE. It's likely the two projects will merge at some point. The project will need to bear several issues in mind. As . Neil Horman explained, some systems elect to stay in the RAM-based filesys¬ tem for stability reasons and never transition to a disk-based root filesystem. Any successful initramfs would have to support that feature, in order to work with various embed¬ ded system projects. Keeping track of what goes into the kernel is always pretty tough. Each new version could contain thousands of patches. There are various ways to track them all, including using git or one of the git repository browsers. John Hawley recently set up a new method at patchwork.kernel.org. This page keeps track of all patches sent to a variety of kernel-related mailing lists, including the main one, linux-kernel. It presents the patches in color and is nicely formatted, and it lets folks change the status of each patch, so it's clear which have been accepted. Although a variety of git documen¬ tation exists, some of it is fairly involved. For folks who'd rather just learn what they need to know, David Howells has written "The Git Hater's Guide To The Galaxy" and submitted it for inclusion in the kernel source tree. It's not the most in-depth git doc out there, but it covers a lot of the stuff David himself uses it for on a daily basis, and it may be more accessible than the more detailed docs out there. One problem with running daemons is that the init process loses track of the relationship between the daemon process and the parent pro¬ cesses that spawned it. As Scott James Remnant has discovered, there doesn't seem to be any straightforward way in Linux for init to know by which process a given daemon was spawned. That information is currently lost by the spawning procedure. Scott has coded up support for some new signals to carry this informa¬ tion into the kernel. If accepted into the main tree, this code will allow system logs to track effectively the activities of the application that spawns any daemons, along with the daemons it spawns. Among other things, this will improve debugging efforts for any applications that spawn daemons. Most modern CPUs have special registers for tracking performance. Things like perfmon use these, but recently Thomas Gleixner and Ingo Molnar took a shot at designing something better. Their initial effort actually has met with fierce resistance from Paul Mackerras and David S. Miller, who felt that the approach Thomas and Ingo had taken was not likely to meet the needs of real systems. The debate does not seem anywhere near over, and certainly Thomas and Ingo will produce some code to prove their points. Probably something excel¬ lent will come out of all this, but currently, the two sides have not had much of a meeting of the minds. Paul has said there's no way to track a process effectively without stopping it, and Thomas and Ingo say, yes, it can be done. Time will tell. — ZACK BROWN USER FRIENDLY by J.D. -llliad” Frazer LINUX JOIIRNAL EDITION INTOLERABLE/ IF IT WASN'T FOR THAT DAMNED LINUX WAT6HAMA6ALLIT WE'D BE SOLD/ “LINUX WATCHAMACALLIT" SIR? VOU KNOW THAT THINS. THAT'S MAKINS US LOSE MONEX \ THE ECONOMY'? /EAH THAT'S IT 1 6 | april 2009 www.linuxjournal.com LJ Index April 2009 [UPFRONT] 1. Lowest legal price in dollars of the Ghosts /-//album by Nine Inch Nails: 0 2. Price in dollars charged for Ghosts 1-1/ at Amazon.com: 5 3. Position of Ghosts /-//among Amazon’s top-selling albums for 2008:1 4. Millions of female drivers in the UK who are “putting themselves and other drivers at risk by wearing the wrong footwear when behind the wheel”: 11.5 5. Preference percentage for a “higher resolution” photo that isn’t in a choice between two actually identical pictures: 75 6. Billions of dollars spent annually on Internet advertising by 2011: 106 7. Percentage of US Internet audience that viewed on-line video in November 2008: 77 8. Billions of on-line videos viewed by US Internet users: 12.7 9. Percentage increase of above over the same period in 2007: 34 10. Google’s (Linux-served) YouTube rank as a US on-line video property: 1 11. Billions of YouTube videos viewed in November 2008: 5.1 12. Google Sites again ranked the top US video property, with nearly 5.1 billion videos. 13. YouTube percentage of all videos viewed in November 2008: 40 14. YouTube share of Google video properties: 98 15. Millions of US Internet viewers in November 2008: 147 16. Average number of videos users watched by US viewers in November 2008: 87 17. Duration in minutes of the average on-line video: 3.1 18. Duration in minutes of the average on-line video viewed at (Linux-served, via Akamai) Hulu.com: 11.9 19. Number of results in a search for “Linux” at AMD.com (US): 1,281 20. Number of results in a search for “Linux” at Freescale.com: 1,445 Sources: h Nine Inch Nails I 2,3: Amazon.com I 4.- Sheila's Wheels (a UK insurance company), citing a 2007 YouGov survey of 754 female drivers I 5: ArsTechnica, citing Journal of Consumer Research I 6: CRM Today I 7-9 and 11-17: MarketingVOX, sourcing comScore's Video Metrix, Marketing Charts I 10,10: SearchDNS.Netcraft.com I 19: AMD I 20-.Freescale EUCALYPTUS: a Tree Growing in the Cloud From the Linux (and Linux Journal) perspective, there's an issue with clouds— those back-end Web services that compose Utility Computing. They're proprietary. Amazon owns AWS (Amazon Web Services: S3, EC2 and a growing number of others). Google, Microsoft and other companies own theirs as well. These are open in the sense that most services are substitutable, which makes them utilities. If you don't like storing your data at Amazon's S3, you can park it elsewhere. The documents you create and keep at Google Docs can be put elsewhere as well. Elastic computing is more tricky, but it should be substitutable as well. In a way, all these data centers are available to the public as a utility service. They are an important trend in computing, comprising the growth of a vast open SLA (service-level agreement) infrastructure for computing resources spread across the Net. (Nicholas G. Carr wrote about all this in his book The Big Switch—Rewiring the World ' from Edison to Google. I visited the topic in "The Bigger Switch", my EOF column in the May 2008 issue of Linux Journal.) But, why should The Cloud consist only of proprietary back ends? How about building our own cloud services, our own way? Eucalyptus I was pleased to find an answer from colleagues at UCSB (where I'm a fellow at the Center for Information Technology & Society), namely Rich Wolski and his merry band of computer scientists in the Computer Science Department. There they have created EUCALYPTUS (Elastic Utility Computing Architecture for Linking Your Programs To Useful Systems). It's what they call "an open-source software infrastructure for implementing Elastic/Utility/Cloud computing using computing clusters and/or workstation farms". It is interface-compatible with Amazon's EC2 (the de facto standard for elastic cloud computing) and designed for modification and extension as needed for you-name-it client-side interfaces. Most important for Linux Journal readers, "EUCALYPTUS is implemented using commonly available Linux tools and basic Web service technology making it easy to install and maintain", they say. The issue for IT folks is a range of choices that should include DIY as well as commercial back ends. Rich Wolski puts it this way: Cloud computing permits "self-service" IT independently of whether the provider is an external company or an internal IT organization. Part of what makes IT onerous these days is that the infrastructure organization also must be a customer service organization. Cloud computing really streamlines customer service for IT in the same way that Web-based e-commerce streamlined customer service for retail. It doesn't eliminate the need entirely (you still can get someone on the phone even when a company has an e-commerce site), but it does improve the business efficiency considerably. As I write this, version 1.5 is coming along. (Version 1.0 was released in June 2008.) And, there are ambitious plans. For more information, check out eucalyptus.cs.ucsb.edu — DOC SEARLS www.linuxjournal.com april 2009 | 17 [UPFRONT SHOPPING ON I was pointed recently to Zappos (www.zappos.com) as a near-perfect example of a company that brings the principles of open source to business. Its site is inventive and fancy (as you'd expect a clothing retailer to be), but not a tri¬ umph of design over utility. What's more, it's fast. I can check Web site responsive¬ ness with some confidence, because our little apartment near Boston has 20Mb/s symmetrical service from Verizon FiOS (that's fiber, and pretty cheap, consider¬ ing), and the speeds I get at the office I share at Harvard are more than twice that. So I decided to see what they were running that site on, by checking with N etc raft, corn's "What's that site running?" service. The answer was Linux. Zappos itself is in an Akamai Netblock, and of the 13 other results (all foo.zappos.com), the results for OS were Linux or "unknown". Then I decided to look beyond Zappos to other on-line retailers. Here are the results for the top ten, as listed by lnternetRetailer.com, with sales volume numbers in parentheses. Results for companyname.com are first, and other results for each company are summarized in text (Netcraft gives results in lowercase): 1. Amazon.com Inc. ($14.8 billion): linux. PENGUINS 2. Staples Inc. ($5.6 billion): linux, through akamai. 3. Office Depot Inc. ($4.9 billion): the top result is linux for www.officedepot.com, but officedepot.com (without the dubs) is windows server 2003. Other foo.officedepot.com sites are a mix of the two and "unknown". 4. Dell Inc. ($4.2 billion): f5-big-ip, though Ldell.com (Dell laptops) is linux and a couple of foo.dell.com sites are "unknown". 5. HP Home & Home Office Store ($3.4 billion): hp-ux. 6. OfficeMax Inc. ($3.2 billion): f5-big-ip, with a mix of Solaris, windows server 2003, linux and "unknown" among other officemax sites. 7. Apple Inc. ($2.7 billion): "unknown", but the company uses linux through akamai for a number of foo.apple.com sites. 8. Sears Holding Corp. ($2.6 billion, includes Sears.com and Kmart.com): for sears.com, linux, plus some "unknown", Solaris, f5-big-ip and windows server 2003 for sears.com.mx. For kmart.com, linux (through akamai), plus linux (with and without akamai) for various foo.sears.com sites. Kmart.com.au is windows 2000. Most of the rest are linux, plus a couple "unknown" and one f5-big-ip. 9. CDW Corp. ($2.4 billion): the top result is linux for www.cdw.com (through akamai). cdw.com (sans dubs) is f5-big-ip. The rest are a mix of linux and f5-big-ip, with one windows server 2003. 10. Newegg: windows server 2003, though linux shows up in five out of the nine foo.newegg.com results. Although that summation is far from a complete picture, or even a completely accu¬ rate one for this Top Ten, it's clear that the picture can't be painted without linux as the most primary color. RESOURCES: Internet Retailer Top 500 Retail Web Sites: www.internetretailer.com/top500/list.asp Netcraft: netcraft.com — DOC SEARLS Even More Videos on LinuxJournal.com We love Web videos. We especially love videos that teach us new quick-and-easy tricks, so we've been cooking up some more videos over in the LinuxJournal.com kitchen. We'll have several short video tips per week in the Tech Tip of the Day section. Visit us often to see some fun tricks to make your life just a little better. Here's one of my favorites: www.linuxjournal.com/video/transfer-your-terminal-screen, — KATHERINE DRUCKMAN LINUS’ BLOG That’s what it’s called. I found out about it when a pal sent a link under the subject line “Hell hath frozen over." Look up the above on Google and you’ll find it. Blogspot, Netcraft tells us, is in the Google, Inc. netblock, and running on Linux. — DOC SEARLS 1 8 | april 2009 www.linuxjournal.com They Said It [UPFRONT] If computers of the kind I have advocated become the computers of the future, then computation may someday be organized as a public utility. We can envisage computing service companies whose subscribers are connected to them by telephone lines.... The system could develop commercially in fairly interesting ways. Certain subscribers might offer services to other subscribers. One example is weather prediction. A weather-predicting company that is a subscriber to the central computer predicts the weather but keeps the predictions in its private files. If you subscribe to its service, your programs can gain access to those files.You may even have weather-predicting programs run for your benefit to answer your own particular questions....Other subscribers might furnish economic predictions.The computing utility could become the basis for a new and important industry. —John McCarthy, in 1961 At present, a newspaper, magazine or book is a package produced by a large organization.With the information utility, the physical production and distribution disappears, allowing a much smaller organization to put out the same packages of text and pictures. Moreover, the user does not face a one-shot decision to buy Time or Newsweek. He will be able to read the “cover” or table of contents of each, read such items as strike his fancy, and the system will bill him for what he reads from each source. In fact, since the cost of keeping a file of information in the computer and making it publicly available will be small, even a high school student could compete with the NewYorker if he could write well enough and if word of mouth and mention by reviewers brought him to public attention. —John McCarthy in the 1970s, www.theregister.co.uk/2005/11/10/gates_ozzie_memos/print.html and www-f o r ma I. sta nf ord .ed u/j mc/f utu re/hote r 1. htm I Does anyone really think that a company-owned platform is going to win here, that it won’t be swamped by an open federated system of servers that peer, like e-mail? If so, I’d like to hear why. We went through this exercise repeatedly in the tech industry; the lesson of history is clear—closed systems have their place and time, at the beginning of a new layer, when users need simplicity over everything else, they serve as training wheels when everyone is a newbie. Eventually we grow out of the need to have our hands held and the freedom of open systems becomes attractive, and we jump. —Dave Winer, www.scripting.com/stories/2009/01/03/helpingFriendfeed.html Nobody will doubt the value of openness for the mobile industry anymore. —Sean Moss-Pultz, article.gmane.org/gmane.comp.handhelds.openmoko.community/33625 as a thank you to our fans for your continued support, we are giving away the new nine inch nails album one hundred percent free, exclusively via nin.com. the music is available in a variety of formats including high-quality MP3, FLAC or M4A lossless at CD quality and even higher-than-CD quality 24/96 WAVE, your link will include all options—all free, all downloads include a PDF with artwork and credits. for those of you interested in physical products, fear not. we plan to make a version of this release available on CD and vinyl in july. details coming soon. —Nine Inch Nails, dl.nin.com/theslip While Linux-based netbooks have not gained much consumer acceptance in the US, their success varies greatly by geographical market. In develop¬ ing countries, Linux-based Eee PCs have fared better....Even if a majority of netbooks run Windows, the minority that run Linux are the most successful non-Windows, non-Macintosh consumer PCs in the industry in terms of penetration. —Forrester Analyst J P Gownder, www.vnunet.com/vnunet/news/2233381/netbooks-sales-driving-linux FREESCALE Freescale may be the first semiconductor company to associate itself aggressively with portable Linux devices. The former Motorola semiconductor division is sharply targeting the low-priced Linux-based Netbook market, which is hot in the world market and just starting to get warm in the US. Early this year, Freescale launched a new processor called the i.MX515 Cortex A8 Netbook Processor. Company literature positions the part for "low-power, gigahertz performance Netbooks at sub-$200 price points". According to CNET, Glen Burchers, director of global marketing for Freescale's consumer products group, says "Because the primary function (of a Netbook) is accessing the Internet, Linux and Firefox are a good operating system and application for that purpose." Freescale is developing a reference design with ASUS-subsidiary Pegatron. It will feature the 1GHz i.MX51 processor, Ubuntu Linux, Adobe's Flash Player, a new power management chip and the SGTL5000 ultra-low-power audio codec. Some data: ■ The i.MX515 is a 65nm CPU based on an ARM11 Cortex-A8 blueprint. ■ Clocks from 600MHz to 1 GHz. ■ Includes the SGTL5000 ultra-low-power audio codec. ■ OpenVG and OpenGL graphics cores are available. ■ Up to eight hours battery life with displays up to 8.9". ■ Memory interface supports both DDR2 and mobile DDR1. ■ MCI3982 power-management integrated circuit, for reduced size and weight and more battery life. The company is working first with Tier 1 OEMs (so watch for ASUS units) and expects products to start hitting the market in Q2 of this year—in other words, about now. RESOURCES: Freescale Semiconductor: www.freescale.com/webapp/search/Serp.jsp "New Freescale Processors Target Linux Netbooks": arstechnica.com/journals/linux.ars/2009/01/07/ new-freescale-processors-target-linux-netbooks "Freescale Chip Aims at 1GHz, $199 Netbook": news.cnet.com/8301 -1001_3-10130690-92.html "Freescale, Nvidia Chase Netbook Sockets": www.eetimes.com/news/latest/showArticle.jhtml? articlelD=212700361 — DOC SEARLS www.linuxjournal.com april 2009 | 19 [UPFRONT What They're Using: PHILIP JACOB I first met Phil Jacob on a consulting gig (yes, I got paid, but that was a long time ago), and quickly discovered that he was one of our most careful readers. Subsequently, he also became one of our most constructive critics—in the best sense of the word. Phil is a born connoisseur. He applies that nature as founder and CTO of StyleFeeder (www.stylefeeder.com), a startup with a "personal shopping engine" that combines machine learning techniques and social data to provide users with a richer shopping experience. Among the features under StyleFeeder's hood is one that personalizes search results from a dataset of more than ten million products using a custom-built recommendation engine. It also has a mature data tier shared across 100 MySQL databases in order to handle its scalability requirements. Given that StyleFeeder is only six people, they've done a lot with a little during the past two years. Phil also is a technology advisor to PRX, a nonprofit licensing and distribution platform for public radio content. He's also married to a well-known food blogger, Beatrice Peltre, who runs La Tartine Gourmande (www.latartinegourmande.com), so at least he eats well When I asked him to share some of what he's using, he Szymanowski: Piano Works 2 OF 100 20 | april 2009 www.linuxjournal.com concentrated his report on a single application—music: Without a doubt, the device that attracts the most attention from guests visiting my house is the Slim Devices Squeezebox sitting in the living room. They usually don't notice it at first, but there's always that "double-take" moment when I change the music using my laptop or my iPod Touch. I store my music in the basement on a Dell machine run¬ ning Ubuntu with a bunch of FireWire disks attached for media files. This server runs Slim Devices' GPL-licensed SqueezeCenter software, which is a daemon that is mostly written in Perl, surprisingly enough. I happen to know Perl quite well as I programmed with it on a full-time basis for many years, so I was actually quite reluctant to buy this device when I first saw it. What I desperately wanted to avoid was a situation that required work just to get my music playing. And imagine a dinner party going silent because of a segfault in your own code! I did, however, end up making a few changes to the software, which was only possible due to the open nature of it (at one point, I had reconfigured it to use MPlayer internally rather than LAME because MPlayer wasn't as abusive to the CPU). One thing I really like about it is that I have a plugin installed that keeps a log of everything that gets played, which means that I could actually tell you what I was playing at 8:14pm last Thursday. One of my forthcoming weekend projects is to syndicate this onto my personal Web site, probably with a programming language that I'm looking to learn (OCaml is near the top of my list these days). I access the music on my basement server when I'm at work by port-forwarding HTTP connections on my router to either Apache or to the SqueezeCenter's built-in streaming capabilities, depending on what I want to do. My router runs dd-wrt, a Linux-based firmware that runs on various types of home routers. It's very stable and provides a bunch of cool features that will appeal to power users. Asked for last words on the subject, Phil adds, "We run RHEL and CentOS at StyleFeeder, some on EC2 and some at Contegix in St. Louis. We run behind Apache and nginx on the Web tier. We own zero servers and run dd-wrt on our office LAN as well....Typing one-handed with a baby in the other...." Babies are a new hack for Phil. — DOC SEARLS Expert included. Johnny is a team leader in our hardware production facility, and he's responsible for operating system installations and validation testing. He is one of the experts who makes certain that when you use the Silicon Mechanics online configuration tools to order your server, you receive exactly what you specified, correctly configured and ready to perform. Johnny sized up the new 1U server from Silicon Mechanics—the Rackform nServ A108—and he's excited about its energy efficiency and cost effectiveness. The AMD Opteron™ 1000 Series processors available with this server are offered in low power consumption models, and the A108 boasts an 86% efficient power supply. With a starting configuration price below $750, the Rackform nServ A108 makes an outstanding entry-level server. When you partner with Silicon Mechanics, you get more than an energy-efficient and cost-effective server configured just the way you want it—you get an expert like Johnny. AMDH Opteron ■ 64 For more information about the Rackform nServ A108 visit www.siliconmechanics.com/A108. sii—icorn MECHANICS Silicon Mechanics and the Silicon Mechanics logo are registered trademarks of Silicon Mechanics, Inc. AMD, the AMD Arrow logo, AMD Opteron, and combinations thereof, are trademarks of Advanced Micro Devices, Inc. visit us at www.siliconmechanics.com or call us toll free at 866-352-1173 COLUMNS AT THE FORGE Writing jQuery Plugins If you’re using jQuery, you already know JavaScript, so now it’s time to write your own jQuery plugins. REUVEN M. LERNER The past two months, this column has looked at the jQuery library for JavaScript programming. jQuery is one of several popular libraries (like Prototype, YUI and Dojo) that have sprouted up in the last few years, making it possible to use JavaScript in ways that make the Web more satisfying and responsive by incorporating desktop¬ like behavior. Part of the reason for jQuery's popularity is the huge library of plugins available for it. There are plugins for almost any type of functionality you can imagine—from GUI widgets to navigational aids to textual transformations. Plugins make it possible to isolate and reuse certain behaviors, achieving a goal known in the Ruby world as DRY (don't repeat yourself). As I showed last month, using a plugin is generally quite easy. Download the plugin; install any CSS and JavaScript files that come with it, and then incorporate the JavaScript file into one or more HTML pages on your site, using a standard clink rel="stylesheet" type="text/css" media="screen" href="ubbi.css" />
This is in Ubbi Dubbi.
Today, we will learn how to make cereal. First, pour the cereal into a bowl. Then pour milk onto the cereal. Finally, eat the cereal with a spoon. Delicious!