用coLinux架站也已經有兩個多月的時間,以目前coLinux的表現來說,可以省掉一台電腦來架出效能還不錯的網站,心理還真是覺得滿意,截至目前為止,沒有當機的情況發生,所有的服務都Work的很好,最高的Uptime也接近17天(還在持續中,看樣子連續開機一個月沒問題),coLinux可以說已經完全達到我的需求了。


但是為了壓榨coLinux,於是想到了跑一下BT來操一下coLinux,由於coLinux本身的鏡像檔容量不大,如果用BT抓東西的話,那鐵定沒幾天就爆,還好coLinux跟本機Windows的檔案交換可以透過cofs(感覺比samba還方便)。

The cofs device is used to directly access files and directories of a Windows host system from a coLinux guest system.
資料來源:http://colinux.wikia.com/wiki/Cofs_device

不過根據coLinux官網對cofs的說法,cofs並不是一個穩定的技術,所以也順便藉此來實測cofs。
Linux的BT軟體也一堆,文字模式下則推薦rTorrent:

rTorrent is a text-based ncurses BitTorrent client written in C++, based on the libTorrent libraries for Unix (not to be confused with libtorrent by Arvid Norberg), “with a focus on high performance and good code”.
資料來源:http://en.wikipedia.org/wiki/RTorrent

文字模式下的rTorrent建議搭配linux screen來執行,這樣可以讓rTorrent放到背景執行,由於rTorrent以C++寫成,非常精簡且不耗資源,經實測後也的確如此,而且適合遠端操作,更適合沒有X的環境,相當適用於我的coLinux Ubuntu Server。
-、安裝rTorrent:

root@yesican:~# apt-get install rtorrent

二、設定rTorrent:

root@yesican:~# nano -w /root/.rtorrent.rc
#rtorrent 設定檔
#~/.rtorrent.rc
# 最小/最大連接數
min_peers = 40
max_peers = 200
# 最大上傳數
max_uploads = 2
# 上傳下載速度限制,0=無限制(單位 KiB)
download_rate = 150
upload_rate = 8
# port 範圍
port_range = 19000-19000
# 下載檔名編碼
encoding_list = UTF-8
# 下載檔案存放目錄
directory = /mnt/disk_c/BT
# 快取存放目錄
session = /mnt/disk_c/BT/session
# rTorrent會掃描此目錄的torrent並自動加入排程
schedule = watch_directory,5,5,load_start=/mnt/disk_c/BT/schedule/*.torrent
# 自動搬移已下載完成的檔案
on_finished = move_complete,"execute=mv,$d.get_base_path=,/mnt/disk_c/BT_finished/;d.set_directory=/mnt/disk_c/BT_finished/"
# DHT on/off
dht = on
# DHT port (預設為 6881)
dht_port = 19000
# peer exchange 啟用
peer_exchange = yes
#hash 檢查 (單位 milliseconds)
hash_interval = 150

參考資料:http://libtorrent.rakshasa.no/browser/trunk/rtorrent/doc/rtorrent.rc?rev=1047#L1
說明:每位使用者,可以有自己的rtorrent設定檔,其路徑為使用者之家目錄。
三、rTorrent的操作:

1. 以方向鍵 ↑、↓、←、→控制。
2. Ctrl + o:改變選取下載目錄。
3. Ctrl + s:開始下載。
4. Ctrl + d:暫停下載。
5. Ctrl + k:暫停下載。
6. Ctrl + d (二次):清除下載。
7. Ctrl + r:check file hash。
8. a/s/d :增加下載速度、z/x/c:減少下載速度。
9. A/S/D :增加上傳速度、Z/X/C:減少上傳速度。
10.→ 觀看此種子下載狀態。
11.主畫面數字鍵:

1 : 顯示全部下載
2 : 以名稱排序
3 : 目前啟動的
4 : 目前停止中的
5 : 已完成的
6 : 未完成的
7 : hash page
8 : 顯示正作種中的頁面
9 : 顯示正在進行的下載

11.Ctrl+ q:離開rtorrent。

參考資料:http://libtorrent.rakshasa.no/wiki/RTorrentUserGuide
四、安裝screen:

root@yesican:~# apt-get install screen

五、screen的操作:
查看Session:

root@yesican:~# screen -ls

輸出結果:

There is a screen on:
7026.pts-0.yesican (2009年11月16日 12時29分15秒) (Attached)
1 Socket in /var/run/screen/S-root.

接續Session:(例)

root@yesican:~# screen -r 7026

離開screen:

root@yesican:~# exit

會顯示:[screen is terminating],表示已離開screen。
六、rTorrent相關截圖:
1.rTorrent抓檔時執行畫面:
image

rTorrent全速下載主畫面

image

rTorrent

2.rTorrent抓檔時系統TCP connection:
image

rTorrent TCP connection

3.rTorrent抓檔時系下載速度(紅色)上傳速度(綠色):
image

rTorrent下載速度(紅色)上傳速度(綠色)

總結來說rTorrent的確是一個相當輕巧卻功能十足的BitTorrent Client。

相關文章

  • 2009年11月21日 -- rTorrent全速下載 (0)
    據說rTorrent是BT下載速度之王,經實際驗證後,rTorrent果然幾乎可以完全把頻寬吃完,真是超厲害的BT下載程式。 話說本站的網路規格是2M/512K的adsl小水管,為了實測rTorre...
  • 2009年11月26日 -- coLinux Ubuntu Server終於當機了 (0)
    我的coLinux Ubuntu Server『終於』當機了,uptime總共26.41天,但是這次當機完全不關coLinux的事,而是我在WinXP安裝一支HD Tune的程式,導致整個WinXP無...
  • 2009年11月9日 -- TCP Connection、Process、Drop ip監控 (0)
    為了監控用coLinux架站的穩定性,目前在本站系統監控上已經有6種監控圖形。這幾天針對TCP Connection、Process、iptables的Drop ip狀況又寫了一隻shell scri...
  • 2010年3月19日 -- 似乎抓到當機的原因了 (0)
    之前在這篇文章提到經過追蹤跟調校之後,經過了7天,原本以為系統穩定了,卻在一次執行rTorrent抓BT檔案時,沒多久coLinux Ubunut Server 就立刻當了。而之前在使用rTorren...
  • 2009年12月9日 -- 記憶體使用率監控 (0)
    自從發現rtorrent在Hashing時會吃光記憶體之後,覺得有必要對系統的記憶體狀況做一個長期觀察與監控,於是用shell再寫了一個記憶體監控程式,數據則來自Linux的free指令,由gnupl...