Archive for the 'Network' Category

FreeBSD 固定開機抓 SCSI Device 的順序

在 /boot/device.hints 設定 hint.scbus.0.at=”ahd0″ 即可。

iSCSI @freebsd

Hint:
1. 預設的 Initiator NodeName 是 iqn.2005-01.il.ac.huji.cs:<hostname>
2. 依照 man 5 iscsi.conf 設定 /etc/iscsi.conf
3. util 是 iscontrol, kernel module 是 iscsi_initiator

iSCSI @debian

1. Compile from source will be easier than installing with apt-get.
2. Kernel source needed. crc32c kernel module needed.
3. modprobe iscsi_tcp crc32c.
4. /etc/init.d/open-iscsi start
5. /sbin/iscsiadm -m discovery -t st -p <ip>
6. /sbin/iscsiadm -m node –targetname <target name> –portal <ip> –login
Then, sd* will appear.

compile tomato firmware @debian

Packages needed: build-essential bison flex zlib1g-dev
Read the README file in the tomato package then run make.
If make complains that it cannot found cross compiler, try

env PATH=$PATH make

踩到 rpc.lockd 的地雷

剛剛 chenpc 說 webmail 不能登入,一試發現真的不能登入,而且 /var/log/maillog 沒有錯誤訊息。
一開始以為是憑證換掉造成 SSL failure,但是 chenpc 說他沒換。
本來打算裝個 ssl client 去試試看的,結果先跑了 sockstat | grep 993 出現:

daemon   rpc.lockd  70353 6  tcp6   *:993                 *:*
root     rpc.lockd  70352 6  tcp6   *:993                 *:*
root     inetd      913   8  tcp4   *:993                 *:*


真是令人絕望的 rpc.lockd …

解決辦法就是關掉 rpc.lockd,把 inetd.conf 裡面的 imap/pop3 加上 v6,然後再跑 rpc.lockd。這樣 rpc.lockd 就不會去聽 IPv6 的 Port 993 了。
(當然,也可以改 webmail 的設定檔,把 localhost 改成 127.0.0.1,強迫走 IPv4…)

screen 的 socket 消失了怎麼辦?

送 SIGCHLD 給他 :)
> killall -20 screen

wiki.tw.freebsd.org

http://wiki.tw.freebsd.org/

歡迎大家多多使用。

rtorrent 的 Peer Exchange & DHT

LibTorrent 0.11.8 與 rTorrent 0.7.8 支援了 Peer Exchange,但連接很多 Peer 時可能會造成 CPU high load。

(in .rtorrent.rc)
peer_exchange = yes

另外也有人寫了 DHT Patch

相關閱讀:
rtorrent with DHT support

年代新聞報導NICONICO動畫


Update: YouTube版:

日文歌詞標音編輯器

日文歌詞標音編輯器

輸入日文歌詞,自動標上假名跟羅馬拼音的工具,正確率大約 80%。
另外常用字(日本公佈的常用漢字表約1800字範圍內)繁體自動轉日文漢字
也就是不需要再去改 步->歩 內->内 了,繁體也會自動轉簡 如 鐵->鉄