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。
ajax跟蹤文件上傳進度條
(文件來源 http://www.ibm.com/developerworks/cn/opensource/os-php-v525/index.html)
2007 年 6 月 08 日
PHP V5.2 為開發人員添加了 hook 以利用實時跟蹤文件上傳進度的功能。本文是 系列文章(共五部分)的第 5 部分,將向您展示如何監視文件上傳並相應地編寫代碼,以及如何創建 PHP 進度條。
一堆 width / height
(引用 https://blog.ericsk.org/archives/776#more-776)
記錄一下,以後可以方便自己查詢。
在寫 JavaScript 時最煩的就是計算畫面或是頁面的大小,但是每家瀏覽器提供的內容都不太一樣,所以我就針對幾個瀏覽器(IE, Firefox, Safari, Opera)共同支援的 attr 來寫個簡單的 cheat sheet:
利用 jQuery 及 Firebug 來 debug web
(引用 https://blog.ericsk.org/archives/790)
如同原文中的回應一樣,原作者實在太聰明了。
相信常在作 Web 開發的人常常會很苦惱 debug 這件事,尤其是用了一堆 ajax 後更是不容易,雖然用「泛mozilla瀏覽器」可以裝 firebug 這個外掛來減輕一些負擔,但還是要自己去 firebug 的 console 及 DOM inspector 裡翻需要看的東西。