Tuesday, November 11, 2008

Share files between Linux host & Linux guest on Virtualbox

Make Virtualbox know which folder you want to share
Devices -> Shared Folders -> Add New Shared Folder
Fill shared folder destination and its name for calling in the guest (Also tick read only or permanent as you wish)

In the guest's terminal
Create folder somewhere you want which the name as what you defined.
Use this command
sudo mount -t vboxsf [folder's name] [the path where the folder is at]


credit : Sharing Folders Between Host and Guest

Sunday, November 9, 2008

How to get USB work in Intrepid

The work around to enable USB in Intrepid is different from Hardy.

The way to do that is to add this below line in the bottom line of /ect/fstab file

#usbfs
none /proc/bus/usb usbfs devgid=46,devmode=664 0 0

that is it!

credit : Intrepid/Virtualbox/USB

Thursday, October 30, 2008

Mount ISO image on Ubuntu

Mount
sudo mount -o loop -t iso9660 [ISO image] [Mount point]

Unmount
sudo umount [Mount point]

Friday, September 5, 2008

Swappiness - รับค่าโอกาสในการไปใช้ swap แทน ram

เนื่องจากผมรัน vmware player แล้วรู้สึกว่าช้ามากจึงไปเช็คที่ Gnome System Monitor ในตอนแรกมองข้ามไป ว่า vmware ไม่ได้กิน resource อะไรเลย แต่ก็งงว่า ที่ตัว process ของ vmware นั้นบอกว่าใช้ memory กว่า 400 MB แต่ทำไม ram ของเราถูกใช้ไปแค่ 400 MB เช่นกัน หงุดหงิด กับสปีดของ vmware อยู่นาน ก็เพิ่งจะได้สังเกตดว่า จริงๆ แล้ว ram ที่ตัว vmware เราใช้นั้นไปอยู่บน swap ซะหมดเลย (มิน่าหละ ทำไมทำอะไรแต่ละที Hard disk ทำงานหนักเหลือเกิน)

จึงทำการหาวิธีการจัดการกับ swap จนไปพบว่าเราสามารถปรับแต่โอกาสในที่จะให้เจ้า Ubuntu ของเราไปวาง memory ไว้บน swap ได้ ด้วยค่า swappiness นี่เอง ซึ่งปกติจะตั้งไว้ที่ 60 แต่จริงๆ เค้าแนะนำไว้ที่ 10 (ยกเว้น งาน server ที่เค้าบอกว่าน่าจะ 60) ตามนี้เลย

ถ้าต้องการตรวจสอบค่า swappiness
cat /proc/sys/vm/swappiness

ถ้าต้องการเปลี่ยนค่า swappiness ชั่วคราว
echo 10 > /proc/sys/vm/swappiness

ถ้าต้องการเปลี่ยนค่า swappiness ถาวรเปลี่ยนค่าที่ไฟล์นี้
gksudo gedit /etc/sysctl.conf
โดยเพิ่มบรรทัดนี้ เข้าไป
vm.swappiness=10
แล้วทำการ reboot


จาก Performance tuning with ''swappiness''

ปล. พบว่าถึงแม้ว่าจะตั้งค่าเป็น 0 ในบางโอกาส OS ก็ยังไปใช้ swap อยู่ดี

Friday, August 29, 2008

Google Keyword Suggestions

ประโยชน์ มีดังนี้
  • เพิ่มเติมจากคำที่เราพิมพ์ผ่านมาให้เลือก (เพื่อความ specific ของคำค้นหา)
  • เดาการพิมพ์ผิด
  • ลดจำนวนครั้งการพิมพ์
จาก At a loss for words?

Thursday, July 24, 2008

เทคโนโลยีเบื้องหลัง Google ranking

หลักการของระบบ search ของ Google มีดังนี้
  • เข้าใจหน้าเว็บ ว่าเป็นนั้นคือเว็บอะไร อยู่ที่ไหน ฯลฯ
  • เข้าใจคำ search แก้คำสะกดผิด, แปลคำที่มีความหมายใกล้เคียงกัน, การขยายความกันและกันของคำ search
  • เข้าใจผู้ search ว่าอยู่ที่ใดบนโลก ต้องการผลแบบใด, ความสนใจ-ชอบ ส่วนบุคคล, แก้ความเข้าใจผิด, หาคำเดียวกันบนภาษาอื่น
จาก Technologies behind Google ranking

Collectd PostgreSQL Plugin

I couldn't find this link when searching with google https://www.collectd.org/documentation/manpages/collectd.conf.html#plugin-postgresq...