Thursday, July 16, 2009

website log analysis for website which host on www.net.cn

1. Download the website log file follow the downloading instruction from www.net.cn
[管理主机] 通过控制面板,配置WebLog日志下载说明 [客服中心][2006年3月16日][6920]
简介:无
内容:
当 您想查看站点的详细的WebLog日志时,可以通过此功能将您想查看的一段时间内日志文件先拷到您站点的wwwlogs目录下,您可以通过FTP的方式将 日志文件下载到您本地进行查看。  注意:  1、由于日志文件较大,当您将日志文件下载到本地后,将您站点的wwwlogs目录下的文件删除,以便节省 您的Web空间。  2、我们只提供一周内的日志文件下载。……
2 Download and install weblog expert from the link blow

http://www.weblogexpert.com/files/WLELiteSetup.exe

3. run the weblog expert. In software window. press new button and input the profile name with any thing you like, domain with your website address, index with the main page of your website. And than press next

4. Press browse button and select the log file which you just download from net.cn and press finish

5 select the profile which you just created and press analyze button now a analysis report would show on your default browser.


Friday, July 10, 2009

Linux NIC bonding

Configuration files:
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-eth1
/etc/sysconfig/network-scripts/ifcfg-bond0
/etc/modprobe.conf
/proc/net/bonding/bond0

Files contant:
  • /etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE=eth0
    USERCTL=no
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes
    BOOTPROTO=none
    ETHTOOL_OPTS="speed 1000 duplex full autoneg on"
  • /etc/sysconfig/network-scripts/ifcfg-eth2
    DEVICE=eth2
    USERCTL=no
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes
    BOOTPROTO=none
    ETHTOOL_OPTS="speed 1000 duplex full autoneg on"
  • /etc/sysconfig/network-scripts/ifcfg-bond0
    DEVICE=bond0
    IPADDR=192.168.100.20
    NETMASK=255.255.255.0
    NETWORK=192.168.100.0
    BROADCAST=192.168.100.255
    ONBOOT=yes
    BOOTPROTO=none
    USERCTL=no
  • /etc/modprobe.conf
    alias eth0 e1000
    alias eth1 tg3
    alias bond0 bonding
    options bond0 miimon=100 mode=5
Bonding mode:
mode=0 (balance-rr)
Round-robin policy: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance.

mode=1 (active-backup)
Active-backup policy: Only one slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The bond's MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides fault tolerance. The primary option affects the behavior of this mode.

mode=2 (balance-xor)
XOR policy: Transmit based on [(source MAC address XOR'd with destination MAC address) modulo slave count]. This selects the same slave for each destination MAC address. This mode provides load balancing and fault tolerance.

mode=3 (broadcast)
Broadcast policy: transmits everything on all slave interfaces. This mode provides fault tolerance.

mode=4 (802.3ad)
IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.
 Pre-requisites:  1. Ethtool support in the base drivers for retrieving  the speed and duplex of each slave.  2. A switch that supports IEEE 802.3ad Dynamic link  aggregation.  Most switches will require some type of configuration  to enable 802.3ad mode.
mode=5 (balance-tlb)
Adaptive transmit load balancing: channel bonding that does not require any special switch support. The outgoing traffic is distributed according to the current load (computed relative to the speed) on each slave. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.
 Prerequisite:  Ethtool support in the base drivers for retrieving the  speed of each slave.
mode=6 (balance-alb)
Adaptive load balancing: includes balance-tlb plus receive load balancing (rlb) for IPV4 traffic, and does not require any special switch support. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the local system on their way out and overwrites the source hardware address with the unique hardware address of one of the slaves in the bond such that different peers use different hardware addresses for the server.

The most used are the first four mode types...

Also you can use multiple bond interface but for that you must load the bonding module as many as you need.
Presuming that you want two bond interface you must configure the /etc/modules.conf as follow:
 alias bond0 bonding  options bond0 -o bond0 mode=0 miimon=100  alias bond1 bonding  options bond1 -o bond1 mode=1 miimon=100

Thursday, July 09, 2009

Install vmware tool on the ubuntu 9.04

Command list:
sudo aptitude install build-essential linux-headers-generic
sudo touch /usr/src/linux-headers-`uname -r`/include/linux/config.h

cp /media/cdrom/VMwareTools-*.tar.gz ~\Desktop\

cd
~\Desktop\

tar xf VMwareTools-*.tar.gz

cd vmware-tools-distrib/

sudo ./vmware-install.pl
-d

Reference:
Ubuntu community document about vmware https://help.ubuntu.com/community/VMware

How To Install VMware Tools on Ubuntu 8.04 Guests https://help.ubuntu.com/community/VMware

Tuesday, July 07, 2009

Linux hard disk operation

LVM
Create LV process
  • Initializing disks or disk partitions

    fdisk - fdisk /dev/sd? press p to list the partition table, press n to create a new partition, press e to create extended partition, press p to create a primary partition(maximum 4 per disk) input the number of the partition if create a primary partition, input fisrt cylinder number, input last cylinder number or +sizeM eg: +100M. Change the partition's system ID by use the fdisk command t, input the partition number after the popup Selected Partition, input desired Hex code of the system id here input 8e which for linux LVM. Use the fdisk command w to write the new partition table to the hard disk.

  • Assign the disks or disk partitions as physical volume
  • Create volume group on one or more PVs
  • Use space from a VG as Logical Volume
  • Format the LV.

Friday, July 03, 2009

Linux harddisk and NIC test command

hdparm -Tt /dev/hd* test the hdd read speed and system cache speed.

ethtool is used for querying settings of an ethernet device and changing them.