顯示具有 網路管理 標籤的文章。 顯示所有文章
顯示具有 網路管理 標籤的文章。 顯示所有文章

星期二, 3月 31, 2009

[FreeBSD] interrupt storm detected on "irq9:"; throttling interrupt source

今天把一台PentiumIII 的 Server 拿來重裝 FreeBSD 7.1,結果裝好了之後卻在畫面一直出現下列的錯誤訊息:

interrupt storm detected on "irq9:"; throttling interrupt source
本來以為是 BIOS 中 irq 的設定問題,結果進 BIOS 改了設定,無效,照常出現錯誤訊息。
又重新 compile 一次 kernel ,將不必要的驅動全註解掉,重開,還是無效~~~~
不得已,又求助google 大神,結果在 http://www.uplinux.com/download/doc/bsd/Handbook/acpi-debug.html 裡發現

11.16. 使用和調試 FreeBSD ACPI

撰寫人:Nate Lawson. 協力:Peter Schultz 和 Tom Rhodes.

ACPI 是在本質上是一種發現設備、管理電源使用, 提供過去由 BIOS 管理的訪問不同硬件的標準化方法。 讓 ACPI 在各種系統上都能正確使用的工作一直在進行, 但許多主板的 ACPI 機器語言 (AML) 字節代碼中的 bug, FreeBSD 的內核中資系統設計的不完善, 以及 Intel ACPI-CA 解釋器中的 bug 仍然市場會出現。

11.16.3.2. System Hangs (temporary or permanent)

Most system hangs are a result of lost interrupts or an interrupt storm. Chipsets have a lot of problems based on how the BIOS configures interrupts before boot, correctness of the APIC (MADT) table, and routing of the System Control Interrupt (SCI).

Interrupt storms can be distinguished from lost interrupts by checking the output of vmstat -i and looking at the line that has acpi0. If the counter is increasing at more than a couple per second, you have an interrupt storm. If the system appears hung, try breaking to DDB (CTRL+ALT+ESC on console) and type show interrupts.

Your best hope when dealing with interrupt problems is to try disabling APIC support with hint.apic.0.disabled="1" in loader.conf.

把 /boot/loader.conf 叫出來,然後加上 「hint.apic.0.disabled="1"」然後重開機,嘿!又是美好的一天了~~~~




星期五, 10月 31, 2008

[FreeBSD]cvsup 換成 portsnap

一直以來, ports 的更新都是利用 cvsup 或 csup 來下載更新,昨天試了 portsnap,覺得還真的蠻好用,也蠻方便的。把它的操作記錄下來。

第一次:
# portsnap fetch
# portsnap extract

之前每次更新
# portsnap fetch update (有些舊的版本,可能得分成兩行 portsnap fetch, portsnap update)


設定定時更新
0 3 * * * root portsnap -I cron update && pkg_version -vIL=

(portsnap cron 會在60分鐘內去下載更新檔)

星期五, 4月 18, 2008

[freebsd ]拒絕 ssh 探測


一直以來都是把所有的機器用tcp_wrapper 擋住外部 ip,開放內部 ip 來登入,然後開放一台機器供 外部連線,再連到其它機器,不過最近每次看到 log 檔,就覺得煩啊!


進入 /usr/ports/security,找了 *ssh* 的 port,嘿!發現有好幾個項目,看到其中一個是 sshblock,感覺可能是我要的功能,就上 google 查了一下,還真的是我想要的功能!



照著網友的說明,兩三下就裝好了,還蠻容易的,可以試試啊!


# cd /usr/ports/security/sshblock
# make
# make install
# vi /etc/rc.conf
#(加入下列指令)
# SSH Block
sshblock_enable="YES"
sshblock_flags="-t /usr/local/etc/sshblock.tragger"

# vi /usr/local/etc/sshblock.tragger
#(加入下列指令, 表示60秒內有3次嘗試登入)
60:3
# /usr/local/etc/rc.d/sshblock start


ps: 忘了提一下,不知是我的 freebsd 版本比較舊,還是 ports 有問題,在安裝 sshblock 時,一直出現無法下載 sshblock檔案的訊息(檔案大小不符)。
fetch: ftp://freebsd.nsysu.edu.tw/pub/FreeBSD/distfiles/sshblock-1.0.pl: size of remote file is not known
所以我就直接用 ftp 連線到任一大學(我選義守 ftp.isu.edu.tw)的 ftp 站,到 freebsd 的 distfiles 下載 sshblock-1.0.pl,把它複製到 /usr/ports/distfiles,然後再重新 make 一次就沒問題了。


星期四, 3月 20, 2008

轉貼 - REMBO 與 GHOST 之比較


Rembo 和 ghost 都是管理電腦教室的好幫手,兩者的管理方式其實有很大的差異,若是個人的話,比較偏愛用 Rembo 這種方式,不過,前提是網路和主機不能出問題啊!!


以下是台中縣吳仁智老師對兩者的比較:http://www.cses.tcc.edu.tw/~chihwu/rembo.htm


星期日, 1月 20, 2008

Ubuntu 設定固定 IP

由於安裝的 Ubuntu 是Desktop的版本,所以,系統裝好了之後預設都是用 Dhcp來取得 IP,記錄一下用手動方式來設定IP

# sudo vi /etc/network/interfaces

一、單網卡單 IP
auto eth0 ## 重要,這一行一定要設定
iface eth0 inet static
address [IP] ## 請將 [IP] 換成你要的 IP
netmask 255.255.255.0
gateway 192.168.1.1

二、單網卡多個 IP(直接在網卡後,加上 “:n“)





auto eth0:0
iface eth0:0 inet static
address [IP]
netmask [遮罩]
gateway [閘道]





auto eth0:1
iface eth0:1 inet static
address [IP]
netmask [遮罩]
gateway [閘道]




設定好了之後,需要重新啟動網卡才會生效,可以利用下列指令來達到這個動作

# sudo /etc/init.d/networking restart


Powered by ScribeFire.

Ubuntu 7.10 和 8.04 Alpha2 的奇怪事

最近買了新電腦,主機板是 技嘉 GA-M56S-S3 ,晶片組是 MCP65,問題來了,裝 Ubuntu 7.10系統,結果內建網卡每次抓到的MAC Address 都不一樣,所以網卡代表每次開機就會累加 eth0, eth1, eth2..........開了20次,就會出現 eth19,這是什麼怪問題啊!
雖然可以在 /etc/udev/rules.d/75-persistent-net-generator.rules 把累加出來的網卡名稱刪掉,不過,這也太麻煩了吧!

加了一張 intel 100 的網卡,情況就改善了,不會再有每次都會不同MAC Address的問題。

接下來,把另一個分割區裝上 Ubuntu Hardy 8.04 alpha2 ,嘿!剛開機時一切都正常,不過 run了一陣子後,整個系統就會當掉,試了很多次,本來以為是 Ubuntu Alpha 為測試版本的問題,不過,上網查了一下,好像沒有發生這種問題啊!後來,突然靈機一動,把網路插回原來主機板內建的網卡,嘿!嘿!截至目前為止,好像就沒有發生過當機的情況了...........

不是說 intel 網卡很穩嗎?怎麼會這樣?

實在搞不懂!!!



Powered by ScribeFire.