richliu’s blog

Linux, 工作, 生活.

richliu’s blog header image 4

GCC ## Preprocessor

February 8th, 2007 · No Comments

之前的程式有用到 ## 減少一些重複的程式, 當時是放在 Linux kernel 2.4 上面, 用的是 gcc 2.95.3, 不過因為改寫到 Linux kernel 2.6 的緣故, 所以 gcc 改用 3.4.6 . 這時就出現錯誤訊息了.

Tags: Linux, Programming

[Read more →]

Tags: Linux · Programming

[Kernel] Linux Kernel 內的 Macro likely() 和 unlikely()

February 1st, 2007 · 2 Comments

在讀 Linux Permier 中文版的時候. Page 2-41 有一段
使用 likely() 與 unlikely() 巨集透過編譯器告知 CPU 有哪些程式區段不需要預測(likely)或有哪些程式區段需要預測(unlikely).

Tags: Linux

[Read more →]

Tags: Linux

[Gentoo] Why I used Gentoo on my server. 我為什麼採用 Gentoo 當作我的系統.

January 30th, 2007 · 17 Comments

最近有一篇很紅的文章
Why Gentoo Shouldn’t be on Your Serve Link
大致上是講 Gentoo 的好處和壞處.
其實講的還算是很有道理,若是要看反面的意見,我想也可以看 comment 的第三個留言, Anonymous 寫的.
我認為也寫的不錯. (原文超過 70+ 留言, 我沒力氣看完 ~_~)

Tags: Gentoo, Linux, Software, UNIX

[Read more →]

Tags: Gentoo · Linux · Software · UNIX

Flash 9 for Linux 正式版……

January 18th, 2007 · 1 Comment

下載點Adobe Flash Player Download Center Linux (x86)
若是中文的使用者, 請按照這一篇修改
Flash Player 9 Update 執行 Firefox 的方法.
試了一下, 玩 Flash Element TD 和 BowMaster 這兩個最近很紅的 Flash感覺是沒有什麼問題.
不過在使用上還是有些不順的狀況, 先放著觀察一下好了. 能在 Linux 下用 Flash 9 還是很感動的呀 ........
Update: 還是有很多怪問題, 還是先換回 Flash 7主要還是 Flash 結束會讓 Firefox 當掉....

Tags: Linux, Software

[Read more →]

Tags: Linux · Software

在 Linux 下用微軟正黑體….

December 30th, 2006 · 2 Comments

之前看朋友 RobertHu 用 Vista 後, 字型非常的好看, 就決定弄微軟正黑體來用, 試用之下果然是讓人滿意的, 目前 Firefox, 系統都改用正黑體了,  有人說 Mac 的黑體更好看, 不過我就沒有試過了, 有人有用過嗎?
在 Linux 下 ClearType 的選項也要打開, 要不然也會糊糊的, 整體來說, 除了 Gnome-Terminal 上 BBS 以外, 應該正黑體就足夠了.

Tags: Linux, Software

[Read more →]

Tags: Linux · Software

Programming Texts and Tutorials

December 21st, 2006 · 1 Comment

Unix(Linux/BSD) 下, 各種軟體, 程式語言的文件收集地.
除了中文以外, 其他己經整理得非常詳細了, 有問題可以到這邊 SearchProgramming Texts and Tutorials

Tags: Linux, Programming

[Read more →]

Tags: Linux · Programming

Linus 不贊成移掉對 non-GPL module 的 support

December 20th, 2006 · No Comments

Binary Driver Layer 這個議題好像是固定會出現在 Linux kernel mailing list.
(看起來以後一年會出現一次)
上次出現是 ODSL 提出 GKAI(General Kernel API Interface),
可以參考我之前的文章 "Linux 是不是應該有 Binary Driver Layer ?"

Tags: Linux

[Read more →]

Tags: Linux

Linux Distro Timeline 1991-2006

December 20th, 2006 · 6 Comments

Digg 有人找了一張圖是 Linux Timeline, 從 1991-2006
主要的 Linux Distro 我都聽過, 不過還是有一些我聽都沒有聽過.
大家可以看看, 自己常用的的 Linux Disto 在那一條線上.

[Tags] Linux Distro [/Tags]

Tags: Linux

[Read more →]

Tags: Linux

Linux 下 ATi and NVidia 的 Overclock

December 6th, 2006 · No Comments

看來有人實作出來了. 先記錄一下....
http://www.phoronix.com/scan.php?page=article&item=598&num=1

Tags: Hardware, Linux, Software

[Read more →]

Tags: Hardware · Linux · Software

利用 smartmontools 監測硬碟建康度

October 26th, 2006 · No Comments

smartmontools 是利用 S.M.A.R.T 這個界面監控硬碟是不是 OK 的小程式
寫了一個小 Script 去監控系統
#!/bin/sh
for var in /dev/hda /dev/hdb
do
echo $var
CHECK=$(/usr/sbin/smartctl -H $var | tail -n 2 | head -n 1 | grep PASSED | awk '{print $6}')
if [ x$CHECK != x"PASSED" ] ; then
echo "HDD ERROR: Device $var" | mail -s "HOST hdd:$var error" [...]

[Read more →]

Tags: Linux