目前工作要釐清的問題
http://www.linuxforums.org/articles/using-top-more-efficiently_89.html
關於 snmp 對 cpu usage 解釋
http://opennms.org/wiki/Net-snmp_5.3_CPU_collections
Monday, January 11, 2010
Wednesday, January 06, 2010
Squid 除錯 - storeSwapOutFileClosed: dirno 1, swapfile 000XXXX, errflag=FFFFFFFF
在 Squid cache.log 看到這個 log 乍看之下以為是 檔案壞掉
2009/12/31 12:44:35| storeSwapOutFileClosed: dirno 1, swapfile 0006DAFB, errflag=FFFFFFFF
經追查結果應該是檔案目錄結構壞掉,無法寫入所致。
把 cache 目錄重新 format 一次再重新建 cache 目錄即可。
2009/12/31 12:44:35| storeSwapOutFileClosed: dirno 1, swapfile 0006DAFB, errflag=FFFFFFFF
經追查結果應該是檔案目錄結構壞掉,無法寫入所致。
把 cache 目錄重新 format 一次再重新建 cache 目錄即可。
Sunday, December 27, 2009
cfengine3 install note - on processing
1. 取得並安裝
wget http://www.cfengine.org/tarballs/cfengine-3.0.3.tar.gz
tar zxvf cfengine-3.0.3.tar.gz
cd cfengine-3.0.3
./configure; make install
2. copy 基本設定檔
mkdir -p /var/cfengine/masterfiles
cp /usr/local/share/doc/cfengine/*.cf /var/cfengine/masterfiles/
3. 第一次執行
cf-key
cd /var/cfengine/masterfiles
cf-agent --bootstrap
這裡會出現兩個錯誤 把下面兩個檔案 copy 到 /var/cfengine/masterfiles
cp /usr/local/share/doc/cfengine/inputs/failsafe.cf .
cp /usr/local/share/doc/cfengine/inputs/update.cf .
再執行一次 cf-agent --bootstrap
wget http://www.cfengine.org/tarballs/cfengine-3.0.3.tar.gz
tar zxvf cfengine-3.0.3.tar.gz
cd cfengine-3.0.3
./configure; make install
2. copy 基本設定檔
mkdir -p /var/cfengine/masterfiles
cp /usr/local/share/doc/cfengine/*.cf /var/cfengine/masterfiles/
3. 第一次執行
cf-key
cd /var/cfengine/masterfiles
cf-agent --bootstrap
這裡會出現兩個錯誤 把下面兩個檔案 copy 到 /var/cfengine/masterfiles
cp /usr/local/share/doc/cfengine/inputs/failsafe.cf .
cp /usr/local/share/doc/cfengine/inputs/update.cf .
再執行一次 cf-agent --bootstrap
Monday, November 30, 2009
Squid 3.1 與 Ubuntu 9.10 - Compile Issue
若用 Ubuntu 9.10 由於 Kernel 已經用到 2.6.31
在 compile 要 squid-3.1.0.15 才不會有問題
用過 squid-3.1.0.8 , squid-3.1.0.13 都不行
0. 先安裝 compiler 相關工具 build-essential
我有用 ldap 所以也要安裝
apt-get install build-essential libssl-dev libldap2-dev
1. tar zxvf squid-3.1.0.15.tar.gz
cd squid-3.1.0.15
vi build.sh
./configure --prefix=/home/squid \
--mandir=/usr/local/man \
--enable-snmp \
--enable-htcp \
--enable-gnuregex \
--enable-dlmalloc \
--enable-referer-log \
--enable-async-io=160 \
--enable-useragent-log \
--enable-cache-digists \
--enable-cpu-profiling \
--enable-kill-parent-hack \
--enable-removal-policies \
--enable-xmalloc-statistics \
--enable-default-err-language=Traditional_Chinese \
--enable-basic-auth-helpers="LDAP" \
--enable-external-acl-helpers="ldap_group" \
--enable-storeio=diskd,ufs \
--with-filedescriptors=4096 \
--with-maxfd=16384 \
--enable-ssl
sh build.sh
make && make install
在 compile 要 squid-3.1.0.15 才不會有問題
用過 squid-3.1.0.8 , squid-3.1.0.13 都不行
0. 先安裝 compiler 相關工具 build-essential
我有用 ldap 所以也要安裝
apt-get install build-essential libssl-dev libldap2-dev
1. tar zxvf squid-3.1.0.15.tar.gz
cd squid-3.1.0.15
vi build.sh
./configure --prefix=/home/squid \
--mandir=/usr/local/man \
--enable-snmp \
--enable-htcp \
--enable-gnuregex \
--enable-dlmalloc \
--enable-referer-log \
--enable-async-io=160 \
--enable-useragent-log \
--enable-cache-digists \
--enable-cpu-profiling \
--enable-kill-parent-hack \
--enable-removal-policies \
--enable-xmalloc-statistics \
--enable-default-err-language=Traditional_Chinese \
--enable-basic-auth-helpers="LDAP" \
--enable-external-acl-helpers="ldap_group" \
--enable-storeio=diskd,ufs \
--with-filedescriptors=4096 \
--with-maxfd=16384 \
--enable-ssl
sh build.sh
make && make install
Saturday, November 28, 2009
Wednesday, October 14, 2009
新版 msn 無法用 squid proxy 連線
新版 MSN 一推出,同事的 MSN 都被打掛不能使用。當天真的很慘, MIS 的電話幾乎被打爆。
昨天重新在 review fail log ,忽然找到原因了。
不能連線的原因是出在若使用者某一台電腦是第一次登入 MSN , MSN 會去取連絡人清單等資料,但由於 MSN 有 BUG,當他在用 SSL 連線取得連絡人清單時,並不會把 LDAP 的 帳號帶過去,所以連線被視為非法連線被 Proxy 拒絕掉。
現在只要讓這些網站的 SSL Connection 可以過, MSN 連線就會正常。
squid.conf example
### for new msn messenger
acl msn_ssl dstdomain .contacts.msn.com .storage.msn.com
http_access allow msn_ssl CONNECT
昨天重新在 review fail log ,忽然找到原因了。
不能連線的原因是出在若使用者某一台電腦是第一次登入 MSN , MSN 會去取連絡人清單等資料,但由於 MSN 有 BUG,當他在用 SSL 連線取得連絡人清單時,並不會把 LDAP 的 帳號帶過去,所以連線被視為非法連線被 Proxy 拒絕掉。
現在只要讓這些網站的 SSL Connection 可以過, MSN 連線就會正常。
squid.conf example
### for new msn messenger
acl msn_ssl dstdomain .contacts.msn.com .storage.msn.com
http_access allow msn_ssl CONNECT
Nvidia Forcedeth 網卡重開會自動關閉 (power off)的作法參考
目前家裡有幾台 Acer Altos Server, OS: CentOS 4.7 Kernel 2.6.28.9 ,
每當重新開機網卡就會開不起來,除非是 cool reboot
找很一段時間,終於用對關鍵字找到文章 forcedeth eth shutdown
網址 http://www.nvnews.net/vbulletin/showthread.php?t=130438
他是說 forcedeth 會在關機的時候 也把自己設定成關閉(應該是自己的 firmware)
新版的 driver 有提供一些參數在 /etc/modprode.conf 可以改變他的行為
不過我換成 2.6.28.10 就沒有這個問題。
每當重新開機網卡就會開不起來,除非是 cool reboot
找很一段時間,終於用對關鍵字找到文章 forcedeth eth shutdown
網址 http://www.nvnews.net/vbulletin/showthread.php?t=130438
他是說 forcedeth 會在關機的時候 也把自己設定成關閉(應該是自己的 firmware)
新版的 driver 有提供一些參數在 /etc/modprode.conf 可以改變他的行為
不過我換成 2.6.28.10 就沒有這個問題。
Monday, September 14, 2009
remove linux ati driver
Uninstalling the ATI Linux Proprietary Driver
Uninstalling the ATI Linux Proprietary Driver is dependent on the mode of the
initial installation.
Automatic or Custom Driver Installations
If the ATI Proprietary Linux Driver was installed using either the Automatic or
Custom options, then do the following:
1 Launch the Terminal Application/Window and navigate to the /usr/share/ati
folder
2 With superuser permissions, enter the command "sh ./fglrx-uninstall.sh"
You have now successfully uninstalled the ATI Linux Proprietary Driver.
Uninstalling the ATI Linux Proprietary Driver is dependent on the mode of the
initial installation.
Automatic or Custom Driver Installations
If the ATI Proprietary Linux Driver was installed using either the Automatic or
Custom options, then do the following:
1 Launch the Terminal Application/Window and navigate to the /usr/share/ati
folder
2 With superuser permissions, enter the command "sh ./fglrx-uninstall.sh"
You have now successfully uninstalled the ATI Linux Proprietary Driver.
Saturday, September 05, 2009
Linux 當機 -> 優雅的重開法
現在 Kernel 有支援 SysRq 一直搞不懂他在做甚麼
原來是一個試圖在當機還能幫系統做些事情的機制
就是按住 ALT + SysRq (PrintScn) 然後依序按 reisub
他會試圖去做 Recover 的動作然後在 reboot
請看一下下面兩篇文章就知
http://linuxtoy.org/archives/what-to-do-if-linux-crash.html
http://alejandrocuervo.com/reisub/
原來是一個試圖在當機還能幫系統做些事情的機制
就是按住 ALT + SysRq (PrintScn) 然後依序按 reisub
他會試圖去做 Recover 的動作然後在 reboot
請看一下下面兩篇文章就知
http://linuxtoy.org/archives/what-to-do-if-linux-crash.html
http://alejandrocuervo.com/reisub/
losf 用法
lsof 有時候去抓一些 process 在開甚麼檔案或是使用甚麼 library 非常有用
下面一篇不錯的文章 去看看吧
http://ph7spot.com/articles/leveraging_lsof
下面一篇不錯的文章 去看看吧
http://ph7spot.com/articles/leveraging_lsof
Subscribe to:
Posts (Atom)
