≡ Menu

Beyond nixCraft

Linux / UNIX: Python programming tutorial for system administrators

Generally I use Perl and Shell script for automation or to make system administration easier for me. Python is an interpreted, interactive, object-oriented programming language that combines remarkable power with very clear syntax. Python runs on Windows, Linux/Unix, Mac OS X, OS/2, Amiga, Palm Handhelds, and Nokia mobile phones.

You can easily adopt Python to manage UNIX and Linux systems while incorporating concepts of good program design. Python is an easy-to-learn, open source scripting language that lets system administrators do their job more quickly. It can also make tasks more fun:

As a system administrator, you run across numerous challenges and problems. Managing users, disk space, processes, devices, and backups can cause many system administrators to lose their hair, good humor, or sanity. Shell scripts can help, but they often have frustrating limitations. This is where a full-featured scripting language, such as Python, can turn a tedious task into an easy and, dare I say it, fun one.

The examples in this article demonstrate different Python features that you can put to practical use. If you work through them, you'll be well on your way to understanding the power of Python.

=> Python for system administrators

Use a hypervisor / virtualization to bring together GPL and proprietary embedded code

This is an interesting information regarding usage of GPL v3 and proprietary code in embedded devices.

Tivoization is the creation of a system that incorporates software under the terms of a copyleft software license, but uses hardware to prevent users from running modified versions of the software on that hardware. Richard Stallman coined the term and believes this practice denies users some of the freedom that the GNU General Public License (GNU GPL) was designed to protect. The term came about in reference to TiVo's use of GNU GPL licensed software on the TiVo brand digital video recorders (DVR).

Generally hypervisors is used to optimize IT Infrastructure with Virtualization. You can improve productivity and development w/ software such as XEN or VMware Software. Now there is a new usage for hypervisors:

This guest whitepaper explains how hypervisors can isolate proprietary software from GPLv2 and GPLv3-licensed software. Authored by a Trango product manager, it uses Trango's hypervisor as an example, showing how the technology could help safeguard copyright-encumbered multimedia content in a video playback device with a user-modifiable Linux OS component.

So how can hypervisors can defeat GPLv3's "anti-tivoization":

Use of a hypervisor can assist device vendors with GPL license compliance, both v2 and v3. It also allows vendors to maintain strong control over their other software components, and ensure that a modified version of GPL software cannot be used to gain access to their sensitive devices or data, or to modify the fundamental behavior of the system.

=> Hypervisors can defeat GPLv3's "anti-tivoization" and Using a hypervisor to reconcile GPL and proprietary embedded code (via Slashdot )

Make money with Linux: Becoming a Linux OEM

You can make money by selling Linux based Laptop and desktop systems. Dell and other vendor started the same. There is huge market for Linux desktop systems. This article talks about entering a world where Microsoft rules the marketplace:

For years, Microsoft has reigned supreme as the 'only' choice for OEM partners on the x86 architecture. Later on, Apple switched from PPC (Power PC) to x86, but really did not make a dent in the OEM market, as Apple produces its own hardware, with OS X being a means to that end. Then it happened: Dell dropped their hat into the ring, perhaps prompting what could become a rush of other PC manufacturers and distributors wishing to enter into OEM deals with various Linux distributions. Keep in mind that Dell is hardly doing anything new here. There have been a number of smaller companies that have worked within the Linux space for some time now. Generally referred to as distributors, their goal remains the same – selling pre-installed Linux-based computers to their customers.

=> Becoming a Linux OEM: A Roadmap

The story of DRM

DRM is technologies intended to give content providers control over redistribution and access to material and is addressed to death in Windows Vista ;) This is a prototype of a video designed to tell the story of DRM. The life and death, the rise and fall, the here today, gone-tomorrow story of DRM. The music is great!

(embed video requires flash)

=> Download this video

The Ultimate Computer Desk / Table (CPU Desk)

CPU DESK - Made From Several Hundred Old CPUs
The coolest desk ever ~ there are 434 Madison 9M chips on the desk. The list price for the lot in 2006 was over US$800,000. The desk now contains about 2.8 TFLOPs of computing power. That's about the same as 900 3.2GHz P4s.

=> Matt's CPU Desk ( via Digg )

Skype outage due to bad log-in mechanisms

On 16th August 2007, the Skype peer-to-peer network became unstable and suffered a critical disruption. According to official blog post it was windows update service:

The disruption was triggered by a massive restart of our users’ computers across the globe within a very short timeframe as they re-booted after receiving a routine set of patches through Windows Update.

The high number of restarts affected Skype’s network resources. This caused a flood of log-in requests, which, combined with the lack of peer-to-peer network resources, prompted a chain reaction that had a critical impact.

There was also news about some Russian crackers brought down the service. Skype has denied this rumor and assured that no malicious activities were attributed or users' security was in danger, at any point.

This incident clearly provides few hints:
(a) Microsoft dominates PC desktop market.
(b) Application code can bring down entire network, so always consider HA ( High-Availability networking and storage) along with app code
(c) Skype does not blame Microsoft. It was their own code

Motorola RAZR 2 V8 Linux phone review

I did used Motorola RAZR V3 for sometime in 2006 before I dropped it into a swimming pool :( The new RAZR 2 has a bigger screen, better UI, quad-band GSM 850/900/1800/1900 with EDGE and Linux platform. OSnews has published a review for the new RAZR 2 V8:

The RAZR2 V8 is a quad-band GSM and EDGE phone, it features two 240x320 TFT screens (one internal 2.2" and one external touchscreen 2.0"), 512 MBs internal storage out of which 420 MBs are accessible, Bluetooth 2.0 with A2DP support, a microUSB charging/data/audio port, and a 2 MP camera without flash. The V8 came with a headset, a British-style charger (PureMobile added to the package both a converter and a mini-USB Motorola-branded charger), a microUSB 2.0 data cable, CDs and manuals, and a 770 mAh Li-Ion battery.

Motorola RAZR 2 V8 Linux phone review

=> Read review here and you can get Motorola RAZR2 V8 Spec Sheet here.

It is believed that it is one of the most popular cell phones around the world. And now it has been updated to run Linux. There is also V9 model with 2Mp camera and a full HTML browser. I want one. I might get this one or may be Apple iPhone.