7月 15
Ubuntu 修正時區及時間
icon1 ken666 | icon2 未分類 | icon4 07 15th, 2008 @ 07:07 pm| icon3沒有留言 »

無論你選擇任何時區,Ubuntu 預設都會假定你硬體時鐘的時區為 UTC (即格林威治GMT)。如果硬碟有其他作業系統,而該系統又將硬體時鐘的時區假定為你所屬時區 (微軟視窗一般會如此)。當你在兩個作業系統交替啟動時,將做成時區混亂。所以建議你把硬體時鐘修正為你所在時區。

把 /etc/default/rcS 中的 “UTC=yes” 改成為 “UTC=no” :

重新啟動系統。這時你的時鐘必會快了或慢了幾個小時,可以依以下方法修正:

$ sudo ntpdate stdtime.gov.hk    # 根據你所指定的時間伺服器修正你的系統時鐘(軟體時鐘)
28 Oct 12:57.47 ntpdate[7297]: adjust time server 210.0.235.14 offset -0 .021044 sec
$ sudo hwclock -w                    # 根據修正好的系統時鐘(軟體時鐘)時間修正硬體時鐘的時間

7月 3

A server suddenly show  ip_conntrack: table full, dropping packet.Found that  ip_conntrack will record TCP established connection , and default  timeout is 5 days ! Yes, 5 days! (432,000s),So there may be problem for a busy server… S(0): upgrade ip_conntrack_max cat the value of ip_conntrack_max :cat /proc/sys/net/ipv4/ip_conntrack_maxInput the value you want each   ip_conntrack buffer takes 292bytesecho “81920″ > /proc/sys/net/ipv4/ip_conntrack_maxorsysctl -w net.ipv4.ip_conntrack_max=81920

S(1): Change ip_conntrack timeout echo “1800″ > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_establishedorsysctl -w net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=1800

More check status grep conn /proc/slabinfo e.g. : ip_conntrack 3024 4090 384 409 409 1 

ip_conntrack the cache name3024 the number of currently active objects4090 the total number of available objects384 the size of each object in bytes409 the number of pages with at least one active object409 the total number of allocated pages1 the number of pages per slab are given

man slabinfo can get more info.

Get the top 5 ip cat /proc/net/ip_conntrack | cut -d ‘ ‘ -f 10 | cut -d ‘=’ -f 2 | sort | uniq -c | sort -nr | head -n 5you will know which ip got most session, if really too much …..froxy ? P2P ?