What is this “load average” ?

Valic —  January 22, 2011 — 1 Comment

I have been asked numerous times what does “load average” means in top.

If you don’t know what top is and you have access to linux machine, go type top now and see what it shows.

load average: 2.05, 2.17, 1.93

Quick answer is:

First number (2.05) is 1 minute avg, second number (2.17) is 5 minute avg, third number (1.93) is 15 min avg.

Generally system admins look at these #’s to see how is their server is doing. But now you wonder, if this is the #’s you look at, why is there cpu %? Isn’t that computer load also? Ofcourse it is. BUT, meaning of cpu % shown in [ Cpu(s): 14.2% us, 1.7% sy, 0.0% ni, 80.7% id, 3.1% wa, 0.0% hi, 0.3% si, 0.0% st ] actually just means how much % of time was spent doing stuff on cpu.

Continue Reading…

Mount ftp shares:

1. Install required packages

apt-get install curlftpfs

2. Create directory to mount the ftp site

mkdir /mnt/my-ftpsite

3. Add the curlftpfs mount into fstab to make it mount everytime the system is started (pico /etc/fstab)

curlftpfs#{username}:{password}@{host} /mnt/my-ftpsite fuse rw,allow_other,uid={userid} 0 0

4. Mount the ftp site Continue Reading…

Vim explicit command list

Valic —  January 11, 2011 — 1 Comment

Vim is an advanced text editor that seeks to provide the power of the de-facto Unix editor ‘Vi’, with a more complete feature set. It’s useful whether you’re already using vi or using a different editor.

Users of Vim 5 and 6 should consider upgrading to Vim 7.

Cursor movement


  • h – move left
  • j - move down
  • k – move up
  • l – move right
  • w – jump by start of words (punctuation considered words)
  • W – jump by words (spaces separate words)
  • e - jump to end of words (punctuation considered words)
  • E – jump to end of words (no punctuation)
  • b – jump backward by words (punctuation considered words)
  • B – jump backward by words (no punctuation)
  • 0 - (zero) start of line
  • ^ – first non-blank character of line
  • $ - end of line
  • G - Go To command (prefix with number – 5G goes to line 5)

Note: Prefix a cursor movement command with a number to repeat it. For example, 4j moves down 4 lines.

Continue Reading…

VMware Server is totally free. All you need is just to register your name and address to obtain a number of serial numbers.

You may get up to 100 serial numbers at a time. In VMware, there are 3 network types: bridge, nat, and host-only:

Bridge is the most powerful one but you need an extra IP address.

If you don’t have one, you might be interesting in nat or host-only. Nat seems to be better to keep your guest OS up-to-date and connected to the internet.  Nat means you can’t connect to the guest OS directly from internet so you can’t run it as a server.

Anyway, it is possible to forward port to the guest OS behind NAT

Usually, the nat configuration will be stored in a file named nat.conf located in each VMware’s network device.

For example, my host OS has vmnet8 as a nat device so there is a nat.conf as follow:

/etc/vmware/vmnet8/nat/nat.conf

Port forwarding is in section incomingtcp and incomingudp.

For example, I would like to ssh to the guest OS on port 22 through port 2222 on the host OS.

[incomingtcp]
2222 = 172.168.254.100:22

After that I have to restart VMware’s network services as below.

/usr/lib/vmware/net-services.sh restart

So now I can ssh to the guest OS as follow:

ssh -p 222 mydomain.com

BitMeter OS is a free, open-source, bandwidth monitor that works on Windows, Linux and Mac OSX.
BitMeter OS keeps track of how much you use your internet/network connection, and allows you to view this information either via a web browser,
or by using the command line tools.

The Web Interface displays various graphs and charts that show how your internet/network connection has been used over time.

The Monitor pane displays a graph that updates once each second, showing you what’s happening with your connection right now:

BitMeter OS Monitor Pane
Continue Reading…