Posts

Memory based file system (ramdisk) on FreeBSD

To create a ramdisk for /tmp and detach it on FreeBSD 8 # /sbin/mdmfs -M -S -o async -s size md0 /tmp Don't forget to chmod +w for read/write # chmod +w /tmp Detach it and delete from /dev/md0 # /sbin/mdconfig -d -u 0 There is a shell script for the operation %cat ramdisk.sh #!/bin/sh case "$1" in create) /sbin/mdmfs -M -S -o async -s 18432m md0 /tmp /bin/chmod 777 /tmp echo "18G ramdisk created on md0 and mounted on /tmp" exit 0 ;; destory) /sbin/umount /tmp /sbin/mdconfig -d -u 0 echo "ramdisk umounted from /tmp and destory from md0" ;; *) echo "Usage: `basename $0` {create|destory}" >&2 exit 64 ;; esac Caution ! This is for specificed purpose only! You have to modify the parameters if you want to use it.

Install Pidgin 2.6.4 from source on OpenBSD 4.6

At first, following content is just my experience to install a newer version from source, it may not works as well as you guys used on LINUX. Do following steps: You have to install following packages before you start to compile pidgin! gmake gstreamer gnutls libnss python cyrus-sasl2 tcl/tk farsight Well, a GTK based desktop environment is needed! (I use XFCE4, Gnome is the best!) Download the source from Pidgin's official site Extract the source Run configure with parameters # ./configure --disable-vv --disable-meanwhile --disable-nm --with-gnutls-includes=/usr/local/include --with-gnutls-libs=/usr/local/lib --with-tclconfig=/usr/local/lib/tcl8.5 --with-tkconfig=/usr/local/lib/tk8.4 Compile # gmake Install as root # sudo gmake install If all the procedures are work properly, you can just start pidgin and enjoy it on OpenBSD 4.6 now! :)

My desktop setting on OpenBSD

.xsession for xdm #export LC_ALL=zh_TW.UTF-8 export LC_ALL=C export LANG=zh_TW.UTF-8 export XMODIFIERS="@im=SCIM" export GTK_IM_MODULE=scim export QT_IM_MODULE=scim scim -d /usr/local/bin/fbpanel & /usr/local/bin/wmmon & /usr/local/bin/wmapm & /usr/local/bin/openbox-session

Dictionary files installation for stardict

After stardict installed, you may... Get dictionary files from sourceforge.net http://stardict.sourceforge.net/Dictionaries_zh_TW.php Extract files to dedicated path /usr/share/stardict/dic Restart stardict That works on Debian/Ubuntu, Enjoy it!

淺談 rsync

請看... http://www.netadmin.com.tw/article_content.asp?sn=0910290002 (網管人) or http://www.openfoundry.org/component/option,com_content/Itemid,334/id,2184/task,view/ (自由軟體鑄造場)

Queue full event with LSI Logic SAS/SATA Adapter on FreeBSD 7.2

I ran into this trouble while installing FreeBSD 7.2 to IBM IntelliStation Z Pro that within LSI SAS/SATA adapter (mpt0)... mpt0: port 0x2000-0x20ff mem 0xfd210000-0xfd213fff,0xfd200000-0xfd20ffff irq 16 at device 0.0 on pci1 mpt0: [ITHREAD] mpt0: MPI Version=1.5.13.0 mpt0: Capabilities: ( RAID-0 RAID-1E RAID-1 ) mpt0: 0 Active Volumes (2 Max) mpt0: 0 Hidden Drive Members (10 Max) It will show following message repeat many times while disk accessing... mpt0: QUEUE FULL EVENT: Bus 0x00 Target 0x00 Depth 128 It might not crash your system but still annoying though! The reason is the hard drive do not accept too much access in queue (That means it depends on hard drive factory setting)! Okay, you can check its default setting with following commands... # camcontrol tag da0 (pass0:mpt0:0:0:0): device openings: 255 You should set its tags lower than the error shows. # camcontrol tag da0 -N 127 (pass0:mpt0:0:0:0): device openings: 127 After that, you can test it with find... # cd / # find ....

Format in cron table

minute hour day month day-of-week [command]