Thursday, November 29, 2007


Computer languages differ not so much in what they make possible, but in what they make easy. Perl is designed to make the easy jobs easy, without making the hard jobs impossible. Perl makes it easy to manipulate numbers, text, files, directories, computers, networks, and programs. It also makes it easy to develop, modify, and debug your own programs portably, on any modern operating system. more...

Wednesday, November 28, 2007

Clone Systems Quickly and Easily

Now that Linux is in widespread use, many businesses that don't want to roll their own Linux systems simply deploy out-of-the-box systems based on supported distributions from sources such as SUSE, Mandriva, Turbo Linux, and Red Hat. Businesses that need a wider array of system or application software than these distributions provide often spend significant effort adding this software to their server and desktop systems, fine-tuning system configuration files, setting up networking, disabling unnecessary services, and setting up their corporate distributed authentication mechanisms. All of this takes a fair amount of time to get "just right"it also takes time to replicate on multiple systems and can be a pain to recreate if this becomes necessary.Read more...

Monday, November 26, 2007

Recover Data from Crashed Disks

As the philosopher once said, "Into each life, a few disk crashes must fall." Or something like that. Today's relatively huge disks make it more tempting than ever to store large collections of data online, such as your entire music collection or all of the research associated with your thesis. Backups can be problematic, as today's disks are much larger than most backup media, and backups can't restore any data that was created or modified after the last backup was made. Luckily, the fact that any Linux/Unix device can be accessed as a stream of characters presents some interesting opportunities for restoring some or all of your data even after a hard drive failure. When disaster strikes, consult this hack for recovery tips.

Perl debugging tutorial

A very lightweight introduction in the use of the perl debugger, and a pointer to existing, deeper sources of information on the subject of debugging perl programs.
There's an extraordinary number of people out there who don't appear to know anything about using the perl debugger, though they use the language every day. This is for them.

Sunday, November 25, 2007

Scalable Public Key Infrastructure for both OpenSWAN and OpenVPN

User management and the related cryptographic authentication infrastructure is a major hurdle in deploying scalable, manageable VPNs (Virtual Private Networks). After introducing VPNs and Public Key Infrastructure (PKI) and discussing some of the benefits and challenges of two popular VPN implementations, we'll document how to build a scalable PKI to simplify VPN authentication management

Saturday, November 24, 2007

Tuning network performance

This three-part series on AIX® networking focuses on the challenges of optimizing network performance. In the first installment, you’ll review some best practices for network configuration, and utilize those practices for efficient monitoring of your hardware by taking advantage of network tools such as netstat, netpmon, entstat, and nmon. You'll also examine certain tools used to look at your interfaces to see how to configure them.

Thursday, November 22, 2007

Kernel synchronization primitives

Multiprocessor systems are mainstream these days. From the desktop to the datacenter, systems with more than one processor are used for everything from high-end desktop applications to large datacenter backends. This month, Jim takes a brief look at the multiprocessor systems architectures in use today, including the shared memory multiprocessor architecture, Sun's choice for its multiprocessor systems. His discussion will provide a solid background for a segue into the locking primitives used by the Solaris kernel to facilitate multiprocessor platform support.

Wednesday, November 21, 2007

UNIX Signals and Process Groups

This document describes the four common UNIX signalling environments, including their interfaces, and contrasts each. In addition, it describes the concepts and interfaces behind both BSD and POSIX process groups.

Monday, November 19, 2007

Anatomy of the Linux SCSI subsystem

The Small Computer Systems Interface (SCSI) is a collection of standards that define the interface and protocols for communicating with a large number of devices (predominantly storage related). Linux® provides a SCSI subsystem to permit communication with these devices. Linux is a great example of a layered architecture that joins high-level drivers, such as disk or CD-ROM drivers, to a physical interface such as Fibre Channel or Serial Attached SCSI (SAS). This article introduces you to the Linux SCSI subsystem and discusses where this subsystem is going in the future.

Sunday, November 18, 2007

Linux Kernel 2.4 Internals

Introduction to the Linux 2.4 kernel. The latest copy of this document can be always downloaded from: This guide is now part of the Linux Documentation Project and can also be downloaded in various formats from: or can be read online (latest version) at: This documentation is free software.. read more

Saturday, November 17, 2007

HOWTO Use hdparm to improve IDE device performance

Hdparm is a tool that allows you to set IDE device settings. This includes things such as DMA modes, transfer settings and various other settings that can help improve the speed of your hard disks and CDROMs. These settings are not enabled by default, so you will probably want to enable them. This guide is also intended to provide more up-to-date information on hdparm settings and inform the user how to check what settings are supported so that the optimum settings for the drive can be used. Many hdparm guides simply tell people to enable specific modes such as '-X33' or '-c1', and as most of these guides are now out-of-date many people end up using those older settings when better, newer options may now be used. By speeding up your hard drives you should get a faster system. It should also help solve stuttering DVD playback or extremely slow burning.

Friday, November 16, 2007

The /proc filesystem

The /proc filesystem is used to store many system configuration parameters. It is a virtual filesystem that resides in the kernels memory. Some of the areas in this filesystem cannot be written to by the root user including /proc/sys. Much information here is based on the proc man page. Fro more information refer to that page. Elements of the proc filesystem include:

Thursday, November 15, 2007

Awk - a tutorial and introduction

Why is AWK so important? It is an excellent filter and report writer. Many UNIX utilities generates rows and columns of information. AWK is an excellent tool for processing these rows and columns, and is easier to use AWK than most conventional programming languages. It can be considered to be a pseudo-C interpretor, as it understands the same arithmatic operators as C. AWK also has string manipulation functions, so it can search for particular strings and modify the output. AWK also has associative arrays, which are incredible useful, and is a feature most computing languages lack. Associative arrays can make a complex problem a trivial more...

Wednesday, November 14, 2007

Adding New Kernel Modules

Building a kernel module that is not yet included in the los-kernel-extras package is a two step process. First you need to create a source package for it. Then you need to add a build directory to the los-kernel-extras package. If you are lucky, the source will already be available as a debian package. You might search for this at | Debian or | Ubuntu package servers. We will use the example of fuse, a kernel module that implements user space file systems. As of right now, fuse-source version 2.5.3-2.1 is available in Debian unstable (sid), so we will use that. We put these lines in our sources list....

Tuesday, November 13, 2007

The GNU Bourne-Again SHell

Bash is the GNU Project's Bourne Again SHell, a complete implementation of the IEEE POSIX and Open Group shell specification with interactive command line editing, job control on architectures that support it, csh-like features such as history substitution and brace expansion, and a slew of other features. Here is a short list of some of the features available in bash.. read more.

Monday, November 12, 2007

Building Products with FreeBSD

The FreeBSD project is a worldwide, voluntary, and collaborative project, which develops a portable and high-quality operating system. The FreeBSD project distributes the source code for its product under a liberal license, with the intention of encouraging the use of its code. Collaborating with the FreeBSD project can help organizations reduce their time to market, reduce engineering costs and improve their product quality.
This article examines the issues in using FreeBSD code in appliances and software products. It highlights the characteristics of FreeBSD that make it an excellent substrate for product development. The article concludes by suggesting a few “best practices” for organizations collaborating with the FreeBSD project.

Sunday, November 11, 2007

Anatomy of Linux synchronization methods

In your Linux® education, you may have learned about concurrency, critical sections, and locking, but how do you use these concepts within the kernel? This article reviews the locking mechanisms available within the 2.6 kernel, including atomic operators, spinlocks, reader/writer locks, and kernel semaphores. It also explores where each mechanism is most applicable for building safe and efficient kernel code.
This article explores many of the synchronization or locking mechanisms that are available in the Linux kernel. It presents the application program interfaces (APIs) for many of the available methods from the 2.6.23 kernel. But before you dig into the APIs, you need to understand the problem that's being solved.

Saturday, November 10, 2007

Socket Programming in PERL

In this article, Rahul shows us how to create a client-server socket program in Perl and then demonstrates it by pinging the server.
What is a socket? Just another bit of computer jargon? Devling a little into networking history, it is a Berkeley UNIX mechanism of creating a virtual duplex connection between processes. This was later ported on to every known OS enabling communication between systems across geographical location running on different OS software. If not for the socket, most of the network communication between systems would never ever have happened.

Thursday, November 08, 2007

Perl programming with DB2 Universal Database

Perl – Practical Extraction and Report Language -- is a powerful and easy-to-use programming language available for many operating systems. Perl is free. You can download the language (in source code or binary form) and use it without paying a license fee.
Perl is an increasingly popular choice. It contains aspects of the C programming language, as well as UNIX® commands such as awk and sed. An interpreted language, Perl can be used in stand-alone applications or with Apache to build Web applications.
You can use Perl to quickly manipulate large sets of data from files or RDBMSs. DBI, the standard for connecting Perl scripts to an RDBMS, was introduced in 1994. You can find the DBI driver source and its documentation at
This article shows you how to write simple Perl programs that extract or manipulate data stored in DB2 UDB. You'll go from the simple task of selecting a row from a database into a Perl program to more advance topics, including dealing with large objects and invoking stored procedures.

Wednesday, November 07, 2007

Unix Daemons in Perl

The word daemon is derived from the Greek word daimon, meaning a "supernatural being" or "spirit", rather than demon, referring to the fallen angels or followers of Satan. Some would insist that Unix is infested with both daemons and demons. In Unix, daemons are typically started by the root process when the operating system is initialized, and run in the background indefinitely. Daemons typically spend most of their time waiting for an event or period when they will perform some task. Examples of common Internet daemons include WU-Ftpd, Apache, BIND, and Sendmail. These particular daemon programs are responsible in part for making the Internet useful, but daemons also serve other purposes that are not as visible to users. In this tutorial, we'll learn how easy it is to turn a Perl script into a daemon process.

Tuesday, November 06, 2007

Unix Systems Administration

The first question is usually "Why am I using UNIX as opposed to another operating system, such as DOS?", or "Why am I using UNIX instead of a mainframe or mini-computer?". This section provides an overview of the capabilities of the UNIX operating system, and why it is a preferred computing platform.

Monday, November 05, 2007

UNIX shell differences

In the near beginning there was the Bourne shell /bin/sh (written by S. R. Bourne). It had (and still does) a very strong powerful syntactical language built into it, with all the features that are commonly considered to produce structured programs; it has particularly strong provisions for controlling input and output and in its expression matching facilities. But no matter how strong its input language is, it had one major drawback; it made nearly no concessions to the interactive user (the only real concession being the use of shell functions and these were only added later) and so there was a gap for something more...

Sunday, November 04, 2007

Perl Arrays - a tutorial

Arrays are a sequence of variables, whose members can be retrieved and assigned to by using their indices. An index passed to an array may well be, and usually is, another variable.
To refer to the $i'th element of the array @myarray, one uses the syntax $myarray[$i]. This element can be assigned to or its value can be retrieved, with the same notation.
Array indices are whole numbers and the first index is 0. As in the length of a string, the number of elements in an array is bounded only by the amount of available memory the computer has. more...

Saturday, November 03, 2007

KernelHacking-HOWTO/Overview of the Kernel Source Code/Internals of Interrupt Handling

This section will discuss, the hardware prospective of interrupt handling fromCPU, Linux Kernel's Interrupt Routing subsystem, Device Drivers's rolein Interrupt handling.
Term Interrupt is self defined,Interrupts are signals sent to CPU on an INTR bus (connected to CPU) whenever any device want to get attention of CPU. As soon as theinterrupt signal occurs, CPU defer the current activity and service the interrupt by executing the interrupt handler corresponding to that interrupt number (also know as IRQ number).
One of the clasifications of Interrupts can be done as follows: - Synchronous Interrupts (also know on as software interrupts) - Asynchronous Interrupts (also know as hardware interrupts)

Key-enabling kernel extensions for the IBM AIX Version 6.1 operating system

Memory overlays and addressing errors are difficult problems to diagnose and service. Growing software size and complexity further complicate the situation. Many software components in the AIX® operating system share the kernel address space.
POWER6™ processors and AIX Version 6.1 now have storage protection keys which the kernel extensions and device drivers can use to improve the reliability and serviceability of the system.
In this article, learn about the new storage protection mechanism, and how to take advantage of storage protection keys to improve the Reliability, Availability, and Serviceability (RAS) characteristics of an existing device driver or kernel extension

Thursday, November 01, 2007

Debian way to make tiny change to package

Have you ever had to make a one-line correction (or customization) in a big package? If so how did you manage it? The obvious way is to rebuild a package and serve it locally, but is there some other approach?
After spending an hour investigating bad behavior from the amoverview perl script in the amanda-server package (2.5.1p1-2.1), I traced the problem to one line in the script. It was an easy fix if you don't mind tweaking code directly in /usr/sbin/,read more...