Linux hard drive benchmark & bottleneck testing software suite for performance

in Categories Download of the day, Linux, Monitoring, Sys admin, Tips, Tuning last updated December 31, 2006

The stress test of hardware (hard drive benchmarks) is a simplistic test. There are a number of benchmarking applications software that can be used as hard disk (storage) stress testing. My favorite is Bonnie++ software.

From the project home page:
Bonnie++ is a benchmark suite that is aimed at performing a number of simple tests of hard drive and file system performance. Then you can decide which test is important and decide how to compare different systems after running it. I have no plans to ever have it produce a single number, because I don’t think that a single number can be useful when comparing such things.

There are a many different types of file system operations which different applications use to different degrees. Bonnie++ tests some of them and for each test gives a result of the amount of work done per second and the percentage of CPU time this took. For performance results higher numbers are better, for CPU usage lower are better.

It test more than 2Gb of storage on 32-bit machines, and tests for file creat(), stat(), unlink() operations.

Install bonnie++ for Linux hard drive benchmark test

Download from official web site or use apt-get to install bonnie++:
# apt-get install bonnie++

Source code installation

Download source code and compile as follows:
$ cd /tmp
$ wget
$ tar -zxvf bonnie++-1.03a.tgz
$ cd bonnie++-1.03a
$ ./configure
$ make
# make install

How do I use bonnie++?

Simply type bonnie++ or bonnie:
$ bonnie++
$ bonnie

Writing with putc()...done
Writing intelligently...done
Reading with getc()...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version  1.03       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
server1          4G 22983  48 17804   7  8880   2 28170  49 32778   4 101.3   0
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
                 16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
server1,             4G,22983,48,17804,7,8880,2,28170,49,32778,4,101.3,0,16,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++,+++++,+++

Caution:This test can put very high load on the disk subsystem make sure you schedule test and inform users.

You can learn about output and result here. Read man page of bonnie for more information.

How to send anonymous email from shell prompt using mixmaster

in Categories Download of the day, Linux, Mail server, Security, Shell scripting, UNIX, Windows last updated December 31, 2006

You can send email with attachment via shell script or at shell prompt/command line using mutt or mail command. This will not hide your IP address.

To send anonymous email from shell prompt use Mixmaster, which is the type II remailer protocol and the most popular implementation of it.

Remailers provide protection against traffic analysis and allow sending email anonymously or pseudonymously. Mixmaster consists of both client and server installations and is designed to run on several operation systems including but not limited to *BSD, Linux and Microsoft Windows.

This article explains how to install mixmaster and how to use it to send email, in an anonymous and secure fashion:

An anonymous remailer is a computer service that privatizes your email. A remailer allows you to send electronic mail to a Usenet news group or to a person without the recipient knowing your name or your email address. Anonymous remailers provide protection against traffic analysis.

This package provides both a client and an optional server installation.

=> Using mixmaster to send anonymous email

A great Zend Framework PHP Tutorial (PDF version)

in Categories Links, Linux, php, UNIX, Windows last updated December 31, 2006
PHP Logo

This tutorial is intended to give a very basic introduction to using the Zend Framework to write a very basic database driven application.

Zend Framework is a new open source effort aimed at producing a high-quality framework for developing modern, robust, secure web applications and web services in PHP 5.

This tutorial is constantly updated by author.

Download link

Download pdf version at Rob Allen’s blog. [English version 83KB]

Also available in Simplified Chinese version, German version, Polish version, and Italian version.

2006: The year the FSF reached out to the community

in Categories GNU/Open source, News last updated December 31, 2006

I like free software and movement was started by FSF.

Bruce Byfield writes about the Free Software Foundation (FSF) how they transformed themselves into an activist organization in the past year.

From the article:
At the start of 2006, the Free Software Foundation (FSF) was largely inward-looking, focused on the GNU Project and high-level strategic concerns such as licensing. Now, without abandoning these issues, the FSF had transformed into an openly activist organization, reaching out to its supporters and encouraging their participation in civic campaigns often designed to enlist non-hackers in their causes. Yet what happened seems to bemuse even FSF employees.


You can learn more about FSF here and here.

Gadgets I brought in 2006

in Categories Beyond nixCraft last updated December 31, 2006

New year’s eve is here and this is my lists of gadgets that rocked my world in 2006 😀


I brought two Notebooks.

1. Dell Inspiron 6400 for office use.

2. Sony VAIO VGN-AR28 – It provides me great entertainment with a sleek design.


I brought total 2 devices.

1. The blackberry Pearl for office use – One of the best and lightest smart mobile phone around.

2. Motorola RAZR V3i – It has large color display along with Bluetooth, 1.3MP digital camera and mp3 music playback.


1. Apple iPod 80 GB – One of the best digital cum video player around. I purchased because of 80 GB space to hold all my songs and videos.

2. XBOX 360 – Video game and entertainment system

3. DVD camcorder Canon DC22 – Very good for capturing life’s good movements.

My 2007 gadgets list

I am planning to purchase following gadgets in 2007:
=> Dell 24″ wide aspect flat panel LCD monitor

=> Nintendo wii game console

=> DIY NAS using software and Intel based system for my growing storage needs.

Did you buy any one of these in 2006? Let me know about your other Gadgets…

Download of the day: PostgreSQL 8.2

in Categories Download of the day last updated December 30, 2006
PostgreSQL Logo

PostgreSQL 8.2 has been released and available for download.

PostgreSQL is a Free object-relational database server (database management system), released under a flexible BSD-style license.

This release adds many functionality and performance improvements that were requested by users, including:
=> Query language enhancements including INSERT/UPDATE/DELETE RETURNING, multirow VALUES lists, and optional target-table alias in UPDATE/DELETE
=> Index creation without blocking concurrent INSERT/UPDATE/DELETE operations
=> Many query optimization improvements, including support for reordering outer joins
=> Improved sorting performance with lower memory usage
=> More efficient locking with better concurrency
=> More efficient vacuuming
=> Easier administration of warm standby servers
=> New FILLFACTOR support for tables and indexes
=> Monitoring, logging, and performance tuning additions
=> More control over creating and dropping objects
=> Table inheritance relationships can be defined for and removed from pre-existing tables etc
=> Read Release Notes for more information

Download PostgreSQL 8.2.

A dump/restore using pg_dump is required for those wishing to migrate data from any previous release.

Understanding Linux virtualization methods, architectures, and implementations

in Categories Howto, Linux last updated December 30, 2006

This is an overview of virtualization methods, architectures, and implementations under Linux.

Tim Jones has published a good article that explains Virtualization. It is a broad term that refers to the abstraction of computer resources.

From the article:
Virtualization means many things to many people. A big focus of virtualization currently is server virtualization, or the hosting of multiple independent operating systems on a single host computer. This article explores the ideas behind virtualization and then discusses some of the many ways to implement virtualization. We also look at some of the other virtualization technologies out there, such as operating system virtualization on Linux.

Understanding Linux virtualization

Read more: Virtual Linux

Postfix masquerading or changing outgoing SMTP email or mail address

in Categories Debian Linux, Gentoo Linux, Linux, Mail server, Postfix, RedHat/Fedora Linux, Suse Linux, Ubuntu Linux, UNIX last updated December 28, 2006

Address rewriting allows changing outgoing email ID or domain name itself. This is good for hiding internal user names. For example:
SMTP user: tom-01
Server name:

However when tom-01 send an email from shell prompt or using php it looks like it was send from

In some cases internal hosts have no valid Internet domain name, and instead use a name such as localdomain.local or something else. This can be a problem when you want to send mail over the Internet, because many mail servers reject mail addresses with invalid domain names to avoid spam.

Postfix MTA offers smtp_generic_maps parameter. You can specify lookup tables that replace local mail addresses by valid Internet addresses when mail leaves the machine via SMTP.

Open your file
# vi /etc/postfix/

Append following parameter
smtp_generic_maps = hash:/etc/postfix/generic

Save and close the file. Open /etc/postfix/generic file:
# vi /etc/postfix/generic

Make sure change to

Save and close the file. Create or update generic postfix table:
# postmap /etc/postfix/generic

Restart postfix:
# /etc/init.d/postfix restart

When mail is sent to a remote host via SMTP this replaces by mail address. You can use this trick to replace address with your ISP address if you are connected via local SMTP.

Understanding Kernel-based Virtual Machine for Linux

in Categories GNU/Open source, Linux last updated December 28, 2006

Kernel-based Virtual Machine (KVM) is a full virtualization solution for Linux on x86 hardware. It consists of a loadable kernel module called kvm.ko and a userspace component, both open source software. The kernel component of KVM is included in mainline Linux, and will appear in upcoming Linux 2.6.20.

KVM allows one to run virtual machines using unmodified Linux or Windows disk images. Each virtual machine has private virtualized hardware: a network card, disk, graphics adapter, etc.

This article tries to explain how it all works, in theory and practice, together with some simple benchmarks. From the article:
Under KVM’s model, every virtual machine is a regular Linux process scheduled by the standard Linux scheduler. KVM consists of two components:
=> a device driver for managing the virtualization hardware
=> a user-space component for emulating PC hardware; this is a lightly modified QEMU process

Taiwan quake causes Internet & telecom problem across India and Asia

in Categories Beyond nixCraft, India, Networking, News last updated December 28, 2006

The strong earth quake off Taiwan on Tuesday night that cut undersea cable brought down Internet and long distance telephone calls for several hours.

At my work place we have several LL from VSNL and one of them went completely down. Thanks to some smart networking and routing traffic was routed via other providers.

Most ISPs in India use Singapore Telecommunications (SingTel). The work is in progress and it will take 2 weeks to fix cable.

=> Total 6 undersea cables are out of order
=> Disrupts telecommunication across Asia
=> In India, back offices and call centers experienced some difficulty
=> Many ISP were down or working extremely slow

But thanks to superb network design and multiple service providers most services back online now.

More information is available here