How to fix MAC Address with IP Address on DHCP server.

Today, I would like to monitor my internet network bandwidth. When my internet network is slow I often have questions from my boss “Why my internet network is slow, who are using a lot of internet bandwidth?”. I cannot answer these questions because I don’t have informations of current network status.

First step, I think I should know which IP Address is using a lot of internet bandwidth and second step I should know who is owner that IP Address.

The answer of the first step , I will use ntop software to answer this question. For the second step, I will fix all MAC Address of Laptop’s wireless card with IP Address on a DHCP Server. And this is my solutions :

Continue reading

Shell script training.

เสาร์อาทิตย์ที่ผ่าน มาก็ได้มีโอกาส กลับไปมหาวิทยาลัย ที่พิษณุโลกมาครับ กลับไปคราวนี้ก็มีภาระกิจสำคัญคือ “การกลับไปสอน Shell Script ให้กับรุ่นน้องที่ มหาวิทยาลัย ก็ผ่านมาได้ด้วยดีครับ น้องๆ ก็โอเค ตั้งใจเรียนกันทุกคน

มาถึงวันนี้ก็เลยถือโอกาส เอาตารางที่ได้เอาไปสอน น้องๆ มา Post เก็บได้ พร้อม กับ Slide ที่เอาไปสอนในครั้งนี้ด้วย

Continue reading

How to backup your thunderbird profile&data on Ubuntu.

Backup
1.  Please check your Thunderbird profile directory by this command.

$ ls -la * | grep .mozilla-thunderbird
-rw-r–r–  1 sketkeaw sketkeaw 32053404 2008-05-30 10:59 mozilla-thunderbird.tgz

2. Start backup

$ cd ~
$ tar cvfz mozilla-thunderbird-[YYYYMMDD].tgz .mozilla-thunderbird

** YYYYMMDD such as 20080525 (2008 May, 28th)

3. Backup completed !!!.

Continue reading

How to enable USB drive in VMware server.

หลังจากที่ ติดตั้ง VMWare server บน Ubuntu 7.10 ก็พบกับปัญหาว่า VMware มันไม่เห็น USB ของ Thumb drive ผมก็เลยต้องมาวิธี Fix

1. เข้าไปแก้ไขไฟล์ /etc/init.d/mountdevsubfs.sh ตั้งแต่บรรทัดที่ 42 – 45 โดยการ Uncomment ออก ก็จะได้ดังนี้

:
mkdir -p /dev/bus/usb/.usbfs
domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount –rbind /dev/bus/usb /proc/bus/usb
:

2. แก้ไขไฟล์ /etc/fstab โดยเพิ่ม

:
usbfs /proc/bus/usb usbfs auto 0 0
:

ไว้ที่บรรทัดสุดท้ายของ ไฟล์ /etc/fstab

3. Start service โดยใช้ command ดังนี้

sudo /etc/init.d/mountdevsubfs.sh start