Entries Tagged as ''

Install Vmware Server in Ubuntu 7.10 (Gutsy Gibbon)

Just got a Core 2 Quad computer with 4G memory. After installing Ubuntu 7.10, the first thing is to install Vmware Server.

First, we need to setup installation enviornments

# sudo apt-get install build-essential linux-headers-`uname -r`

# sudo apt-get install xinetd

Then, we need to register on VMware website to get register number. After that, we can get installation package.

# sudo wget http://download3.vmware.com/software/vmserver/VMware-server-1.0.4-56528.tar.gz

Then, we need to extract the package under the directory.

# sudo tar -vxzf VMware-server-1.0.4-56528.tar.gz

Then, we go to vmware-server-distrib directory

# cd vmware-server-distrib

Then, we start to install VMware server

# sudo ./vmware-install.pl

It will automatically trigger /usr/bin/vmware-config.pl. After typing 20-character serial number, we have done the installation.

For configure network, please refer the following diagram.

VMware Network Inllustration

Linux Disk Testing Utilities

Due to always working on Linux, I’d like share some disk testing tools, by which, you can handle your disk very well.

How can I know disk performance?

There are two ways you can know your disk read/write performance. One is low level read/write big file (e.g. 2G) by using dd tool, the other is using hdparm command.

// write a 2G file

# date; dd if=/dev/zero of=/tmp/tmpfile bs=1024 count=2048000; date

// Read a 2G file

# date; dd if=/tmp/tmpfile of=/dev/null bs=1024 count=2048000; date

# hdparm -tT /dev/sda

/dev/sda:
Timing cached reads: 1102 MB in 2.00 seconds = 550.90 MB/sec
Timing buffered disk reads: 208 MB in 3.03 seconds = 68.74 MB/sec

How can I get hard disk parameters?

You can use hdparm command by following -iI options. We will care about which DMA we were used. If the DMA is not what we expected, we can use -X option to change it.

# hdparm -iI /dev/sda

How can I monitor hard disk at back end?

Most of ATA-3 and later ATA, IDE and SCSI-3 have build-in SMART system, which is to monitor the reliability of the hard drive and predict drive failures, and to carry out different types of drive self-tests. “smartctl” is a command line utility to perform SMART self-test and can send email alert if error happened.

// run overall-health self-assessment tests

# smartctl -d ata -H /dev/sda

martctl version 5.37 [i386-redhat-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

// read more data from hard disk

#smartctl -d ata -a /dev/sda
smartctl version 5.37 [i386-redhat-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.9 family
Device Model: ST3160812A
Serial Number: 5LS8E2F2
Firmware Version: 3.AAJ
User Capacity: 160,041,885,696 bytes
Device is: In smartctl database [for details use: -P show]
ATA Version is: 7
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Mon Dec 24 10:54:28 2007 PST
SMART support is: Available – device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===

… …

How can I know the temperature of hard disk?

We need a command utility named “hddtemp“.

# yum -y install hddtemp

Then, we can simply know the temperature of hard disk by typing

# hddtemp /dev/sda

/dev/sda: ST3160812A: 33°C

Stay Hungry. Stay Foolish.


Steven Jobs is the man I most admired. I saw a video named “Nerd”, which was made in 1997. The video traced back to the brilliant ear of Apple II, as well as Macintosh. This time, I post my favorite presentation made by him, for people who want to do something.

Again, you can’t connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something — your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.

Sometimes life hits you in the head with a brick. Don’t lose faith. I’m convinced that the only thing that kept me going was that I loved what I did. You’ve got to find what you love. And that is as true for your work as it is for your lovers. Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work.

Don’t be trapped by dogma — which is living with the results of other people’s thinking. Don’t let the noise of others’ opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition.

Batch Rename File

I have created a photo album and uploaded to my web server. However, surprisingly, those photos didn’t show up. After troubleshooting, I noticed, some of photos have GB2312 code in the file name. So, I need to batch change them to UTF-8 code. The following is tcsh script, which can replace all “unknown-char” to “photo”.

#!/bin/tcsh

foreach i (*.jpg)
echo $i > /tmp/filename
set j=`sed -e ’s/unknown-char/photo/g’ /tmp/filename`
mv “$i” “$j”
rm /tmp/filename
end

Happy Christmas

(Happy Xmas Kyoko
Happy Xmas Julian)

So this is Xmas
And what have you done
Another year over
And a new one just begun
And so this is Xmas
I hope you have fun
The near and the dear one
The old and the young

A very Merry Xmas
And a happy New Year
Let’s hope it’s a good one
Without any fear

And so this is Xmas
For weak and for strong
For rich and the poor ones
The world is so wrong
And so happy Xmas
For black and for white
For yellow and red ones
Let’s stop all the fight

A very Merry Xmas
And a happy New Year
Let’s hope it’s a good one
Without any fear

And so this is Xmas
And what have we done
Another year over
A new one just begun
And so happy Xmas
We hope you have fun
The near and the dear one
The old and the young

A very Merry Xmas
And a happy New Year
Let’s hope it’s a good one
Without any fear
War is over, if you want it
War is over now

Happy Xmas

Randy Pausch’s Last Lecture

Recently I was depressed by something that I don’t wanna mention, until I saw the “Last Lecture” hold by Randy Pausch, who was university professor and just got serious cancer with only 4 or 5 months to live. From the lecture, I was deeply touched by lessons about reaching goals, achieving dreams, the power of enthusiasm. If you think the dream is hard to come true, just remember: “Brick walls are there for a reason, they let us prove how badly we want things.”

Randy Pausch’s Last Lecture