IE6 卡到陰….
話說小弟開發某個web js 在ie6必須 按f5重整才能正常run…..
卡了很久起初懷疑沒有讀到js …………..
使用setTimeout(init, 100);
Zend Framework(一)
Zend Framework
**屁話:**寫這些東西是一方面紀錄,並希望再寫完文章時成功開發一個專案.
Zend Framework
我認為他是眾多”工具”的一個代表. 工具不就是要拿來用,
而我們程式開發用他我們就是使用著.所以很多人有不一樣的用法~~~
以下是我所規劃的理想用法 歡迎討論
筆記 有用的RC.CONF
sshd_enable=”YES”
syslogd_enable=”YES”
syslogd_flags=”-ss”
# 註:-s 是啟用安全模式,不記錄遠端傳送過來的 log
# 如果 -ss 是關閉 port,而且也禁止將 log 傳送到遠端的電腦。
sendmail_enable=”NO”
# 註:NO 是僅提供 localhost 的 mail 功能,如果要完全關閉 sendmail 要用 NONE
inetd_enable=”NO”
# 註:4.4-Release 版之後的 FreeBSD 預設 /etc/initd.conf 中的所有服務都是 # 註解掉的
# 如果你確定你的 Server 不提供 inetd 服務,可以加上這行
tcp_drop_redirect=”YES”
# Don’t allow remote OS fingerprinting of your box
icmp_drop_redirect=”YES”
# 註:防止 DoS 攻擊,最好把 ICMP 重導向的封包丟棄
icmp_log_redirect=”YES”
# 註:將丟棄的 ICMP 重導向封包 log 記錄下來
clear_tmp_enable=”YES”
# 開機時清除 /tmp 的內容
icmp_bmcastecho=”NO”
# 不回應 broadcast ping 封包
fsck_y_enable=”YES”
# 註:do fsck -y if the initial preen fails
update_motd=”NO”
# 註:update version info in /etc/motd (or NO)
named_enable=”YES”
# 提供 DNS 的服務
ntpdate_enable=”YES”
ntpdate_flags=”clock.stdtime.gov.tw”
# 開機自動校時
keyrate=”fast”
# 重覆按下按鍵的速度
FreeBSD 7.0-RELEASE了
引用http://www.freebsd.org/releases/7.0R/announce.html
Date: Wed, 27 Feb 2008 17:19:52 -0500
From: Ken Smith kensmith@FreeBSD.org
To: freebsd-announce@FreeBSD.org
Subject: [FreeBSD-Announce] FreeBSD 7.0-RELEASE Available
The FreeBSD Release Engineering Team is pleased to announce the availability of FreeBSD 7.0-RELEASE. This is the first release from the 7-STABLE branch which introduces many new features along with many improvements to functionality present in the earlier branches. Some of the highlights:
-
Dramatic improvements in performance and SMP scalability shown by various database and other benchmarks, in some cases showing peak performance improvements as high as 350% over FreeBSD 6.X under normal loads and 1500% at high loads. When compared with the best performing Linux kernel (2.6.22 or 2.6.24) performance is 15% better. Results are from benchmarks used to analyze and improve system performance, results with your specific work load may vary. Some of the changes that contribute to this improvement are:
rrdtool create 網路圖表檔案
rrdtool create test.rrd -s 300 \
DS:if02:COUNTER:600:U:U \
DS:if03:COUNTER:600:U:U \
DS:if04:COUNTER:600:U:U \
DS:if05:COUNTER:600:U:U \
DS:if06:COUNTER:600:U:U \
DS:if07:COUNTER:600:U:U \
DS:if08:COUNTER:600:U:U \
DS:if09:COUNTER:600:U:U \
DS:if10:COUNTER:600:U:U \
DS:if11:COUNTER:600:U:U \
DS:if12:COUNTER:600:U:U \
DS:if13:COUNTER:600:U:U \
DS:if14:COUNTER:600:U:U \
DS:if15:COUNTER:600:U:U \
DS:if16:COUNTER:600:U:U \
DS:if17:COUNTER:600:U:U \
DS:if18:COUNTER:600:U:U \
DS:if19:COUNTER:600:U:U \
DS:if20:COUNTER:600:U:U \
DS:if21:COUNTER:600:U:U \
DS:if22:COUNTER:600:U:U \
DS:if23:COUNTER:600:U:U \
DS:if24:COUNTER:600:U:U \
DS:if25:COUNTER:600:U:U \
DS:if26:COUNTER:600:U:U \
DS:if27:COUNTER:600:U:U \
DS:if28:COUNTER:600:U:U \
DS:if29:COUNTER:600:U:U \
DS:if30:COUNTER:600:U:U \
DS:if31:COUNTER:600:U:U \
DS:if32:COUNTER:600:U:U \
DS:if33:COUNTER:600:U:U \
DS:if34:COUNTER:600:U:U \
DS:if35:COUNTER:600:U:U \
RRA:AVERAGE:0.5:1:603 \
RRA:AVERAGE:0.5:6:603 \
RRA:AVERAGE:0.5:24:603 \
RRA:AVERAGE:0.5:288:603 \
RRA:MIN:0.5:1:603 \
RRA:MIN:0.5:6:603 \
RRA:MIN:0.5:24:603 \
RRA:MIN:0.5:288:603 \
RRA:MAX:0.5:1:603 \
RRA:MAX:0.5:6:603 \
RRA:MAX:0.5:24:603 \
RRA:MAX:0.5:288:603
rrdtool 實作6台主機 LOADING 繪圖
rrdtool graph test.png \
–start=-86400 \
–end=-300 \
–base=1000 \
–title “大安 UBR CPU負載” \
–height=120 \
–alt-autoscale-max \
–lower-limit=0 \
–slope-mode \
-n TITLE:12:/usr/share/fonts/truetype/bsmi00lp.ttf \
–font DEFAULT:0:/usr/share/fonts/truetype/bsmi00lp.ttf \
DEF:c1=$rrd_data:c1:AVERAGE \
DEF:c2=$rrd_data:c2:AVERAGE \
DEF:c3=$rrd_data:c3:AVERAGE \
DEF:c4=$rrd_data:c4:AVERAGE \
DEF:c5=$rrd_data:c5:AVERAGE \
DEF:c6=$rrd_data:c6:AVERAGE \
COMMENT:”主機 ===最大值=== ===平均值=== ===最小值=== ===目前=== \n” \
LINE1:c1#000080:”01負載” \
GPRINT:c1:MAX:” %5.0lf ” \
GPRINT:c1:AVERAGE:” %5.0lf ” \
GPRINT:c1:MIN:” %5.0lf ” \
GPRINT:c1:LAST:” %5.0lf” \
COMMENT:”\n” \
LINE1:c2#0000FF:”02負載”:STACK \
GPRINT:c2:MAX:” %5.0lf ” \
GPRINT:c2:AVERAGE:” %5.0lf ” \
GPRINT:c2:MIN:” %5.0lf ” \
GPRINT:c2:LAST:” %5.0lf” \
COMMENT:”\n” \
LINE1:c3#008000:”03負載”:STACK \
GPRINT:c3:MAX:” %5.0lf ” \
GPRINT:c3:AVERAGE:” %5.0lf ” \
GPRINT:c3:MIN:” %5.0lf ” \
GPRINT:c3:LAST:” %5.0lf” \
COMMENT:”\n” \
LINE1:c4#00ff00:”04負載”:STACK \
GPRINT:c4:MAX:” %5.0lf ” \
GPRINT:c4:AVERAGE:” %5.0lf ” \
GPRINT:c4:MIN:” %5.0lf ” \
GPRINT:c4:LAST:” %5.0lf” \
COMMENT:”\n” \
LINE1:c5#800000:”05負載”:STACK \
GPRINT:c5:MAX:” %5.0lf ” \
GPRINT:c5:AVERAGE:” %5.0lf ” \
GPRINT:c5:MIN:” %5.0lf ” \
GPRINT:c5:LAST:” %5.0lf” \
COMMENT:”\n” \
LINE1:c6#ff0000:”06負載”:STACK \
GPRINT:c6:MAX:” %5.0lf ” \
GPRINT:c6:AVERAGE:” %5.0lf ” \
GPRINT:c6:MIN:” %5.0lf ” \
GPRINT:c6:LAST:” %5.0lf” \
-h 120 -w 500 -v “百分比 %” –no-minor
RRDtool
為 MRTG 進階版,原 MRTG 作者覺得 MRTG 有缺點(例如無法一個流量圖集合所有相關要統計的數據)所以便又著手開發 RRDTool,RRDTool 一樣是利用 SNMP 協定,去偵測有提供 SNMP 資訊的設備來畫出數據統計流量圖,原 RRDTool 1.0.x 版本時時是利用 GD 來畫出數據統計流量圖,在 RRDTool 1.2.x 版本之後作者為了使數據統計流量圖能匯出 PDF 文件格式,因此便改為使用 libart 及 freetype 來畫出數據統計流量圖(雖然效率慢很多),但因為 rrdtool 語法必須要深入研究因此有人利用 php 寫出 [cacti] 這軟體使您比較容易控制 rrdtool,同時也有許多的 cacti plugin 可以使用,本篇實作也是利用 cacti 來控制 rrdtool作說明。
MySQL Master/Slave Server (Replication Database)
MySQL 提供 Master/Slave 機制讓您輕易的完成多個 MySQL Server 之間的資料同步,有了多個資料同步的 MySQL Server 在管理上會較有彈性,例如你可以建置備援主機或是進行負載平衡等等。但是要注意:一台 Master Server 可以擁有很多台 Slave Server;但一台 Slave Server 只可對應到一台 Master Server。