May, 2007 的文章
网站汉化计划 - 完成
31/05/2007 22:40Fedora 7 is released
20:45Fedora 7 is offically released today. After several warning from friendly blogs, I decided to stay on FC6 until workable solution comes out.
As mentioned, Fedora 7 changed a lot on hardware driver, and the way of modules building into kernel. It is in theory blocked the way upgrade from previous version. From this pointview, Debian is always the best distro of Linux, so easy to upgrade from one version to another!
Tags: Computing, fc6, fedora 7, hardware driver, kernel, linux, OS
类别: Computing, OS
没有留言 »
Agile Estimating and Planning
30/05/2007 21:48Mike mentioned Agile dev last night. It sounds useful for web development, so I found a book and decided to learn a little bit of software engineering for web development, well, at least know what it is about.
Agile Estimating and Planning
Robert C. Martin
Paperback: 368 pages
Publisher: Prentice Hall PTR (31 Dec 2004)
Language English
ISBN-10: 0131479415
ISBN-13: 978-0131479418
http://www.amazon.co.uk/Agile-Estimating-Planning-Robert-Martin/dp/0131479415
Tags: 0131479415, agile, prentice hall ptr, Reading, software engineering
类别: Reading
没有留言 »
Fine tune GCC parameters to boost APACHE 2.2
19/05/2007 14:10First get CPU infomation from /prco/cpuinfo
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping : 1
cpu MHz : 3000.000
cache size : 1024 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 3
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe constant_tsc pni monitor ds_cpl cid xtpr
bogomips : 6029.46
Change CFLAGS to
-O3: The higher value, the smaller binnary file. But in practical, I did not feel and speed boost. I prefer 3 rather than 6 now, as it can save much time on compiling
-msse2 : enable SSE2 CPU instrcution
-mmmx : enable MMX CPU instrcution
-mfpmath=sse : Generate floating point arithmetics for SSE unit
-mtune=pentium4 : Special optimized for P4
-fomit-frame-pointer” : Removes the frame pointer for all functions, as it is a production server
After changing those parameters, my apache server boost around 10%
Tags: apache server, Computing, floating point, mmx cpu, Networking, o3, OS, p4, pentium4, speed boost, sse, sse2
类别: Computing, OS, Networking
没有留言 »
Block msn traffic using CISCO policy-map
05/05/2007 22:101. Using ACL block relavent port to msn, such tcp/udp 1836, etc.
2. But, as we all know, msn 7.5 can use http(tcp 80 port) go through firewall. There are some sample of msn http header
Here is the first request and response in a notification server session:
POST http://gateway.messenger.hotmail.com/gateway/gateway.dll?Action=open&Server=NS&IP=messenger.hotmail.com HTTP/1.1\r\n
Accept: */*\r\n
Accept-Language: en-us\r\n
Accept-Encoding: gzip, deflate\r\n
User-Agent: MSMSGS\r\n
Host: gateway.messenger.hotmail.com\r\n
Proxy-Connection: Keep-Alive\r\n
Connection: Keep-Alive\r\n
Pragma: no-cache\r\n
Content-Type: application/x-msn-messenger\r\n
Content-Length: 18\r\n
\r\n
VER 5 MSNP8 CVR0\r\n
HTTP/1.0 200 OK\r\n
Server: Microsoft-IIS/5.0\r\n
Date: Tue, 18 Mar 2003 07:39:53 GMT\r\n
X-MSN-Messenger: SessionID=954547325.13160; GW-IP=207.46.110.18\r\n
Content-Length: 18\r\n
Content-Type: application/x-msn-messenger\r\n
Age: 0\r\n
Via: HTTP/1.1 ntl_site (Traffic-Server/5.2.0-R [c sSf ])\r\n
X-Cache: MISS from nautilus.localdomain\r\n
X-Cache-Lookup: MISS from nautilus.localdomain:80\r\n
Proxy-Connection: keep-alive\r\n
\r\n
VER 5 MSNP8 CVR0\r\n
Here is the first request in a switchboard server session:
POST http://gateway.messenger.hotmail.com/gateway/gateway.dll?Action=open&Server=SB&IP=207.46.108.13 HTTP/1.1\r\n
Accept: */*\r\n
Accept-Language: en-us\r\n
Accept-Encoding: gzip, deflate\r\n
User-Agent: MSMSGS\r\n
Host: gateway.messenger.hotmail.com\r\n
Proxy-Connection: Keep-Alive\r\n
Connection: Keep-Alive\r\n
Pragma: no-cache\r\n
Content-Type: application/x-msn-messenger\r\n
Content-Length: 55\r\n
\r\n
USR 3 phil_sayers@hotmail.com 214963.1047973248.28908\r\n
Here is a message polling the server for queued messages, and finding none:
POST http://207.46.110.18/gateway/gateway.dll?Action=poll&SessionID=954547325.32498 HTTP/1.1\r\n
Accept: */*\r\n
Accept-Language: en-us\r\n
Accept-Encoding: gzip, deflate\r\n
User-Agent: MSMSGS\r\n
Host: 207.46.110.18\r\n
Proxy-Connection: Keep-Alive\r\n
Connection: Keep-Alive\r\n
Pragma: no-cache\r\n
Content-Type: application/x-msn-messenger\r\n
Content-Length: 0\r\n
\r\n
HTTP/1.0 200 OK\r\n
Server: Microsoft-IIS/5.0\r\n
Date: Tue, 18 Mar 2003 07:39:56 GMT\r\n
X-MSN-Messenger: SessionID=954547325.6942; GW-IP=207.46.110.18\r\n
Content-Length: 0\r\n
Content-Type: application/x-msn-messenger\r\n
Age: 1\r\n
Via: HTTP/1.1 ntl_site (Traffic-Server/5.2.0-R [c sSf ])\r\n
X-Cache: MISS from nautilus.localdomain\r\n
X-Cache-Lookup: MISS from nautilus.localdomain:80\r\n
Proxy-Connection: keep-alive\r\n
\r\n
Here is a message closing the session from the client side:
POST http://207.46.110.18/gateway/gateway.dll?SessionID=954547325.3500 HTTP/1.1 \r\n
Accept: */*\r\n
Accept-Language: en-us\r\n
Accept-Encoding: gzip, deflate\r\n
User-Agent: MSMSGS\r\n
Host: 207.46.110.18\r\n
Proxy-Connection: Keep-Alive\r\n
Connection: Keep-Alive\r\n
Pragma: no-cache\r\n
Content-Type: application/x-msn-messenger\r\n
Content-Length: 5\r\n
\r\n
OUT\r\n
HTTP/1.0 200 OK\r\n
Server: Microsoft-IIS/5.0\r\n
Date: Tue, 18 Mar 2003 07:41:39 GMT\r\n
X-MSN-Messenger: SessionID=954547325.1484; GW-IP=207.46.110.18; Session=close\r\n
Content-Length: 0\r\n
Content-Type: application/x-msn-messenger\r\n
Age: 0\r\n
Via: HTTP/1.1 ntl_site (Traffic-Server/5.2.0-R [c sSf ])\r\n
X-Cache: MISS from nautilus.localdomain\r\n
X-Cache-Lookup: MISS from nautilus.localdomain:80\r\n
Proxy-Connection: keep-alive\r\n
\r\n
3. define class-map
class-map match-any im
match protocol http s-header-field “MSMSGS”
match protocol http c-header-field “MSMSGS”
match protocol http url “*gateway.messenger.hotmail.com*”
match protocol http url “*messenger.hotmail.com*”
match protocol http url “*messenger.msn.com*”
this class-map trys to find the package with “MSMSGS” in the header and the packages contains gateway.messenger.hotmail.com, messenger.hotmail.com, messenger.msn.com
4. create policy-map to drop the package with above attributes
policy-map block-p2p
class im
drop
5. then apply it on either in or out, or both
interface FastEthernet0/1
service-policy input block-p2p
service-policy output block-p2p
THIS IS ONLY AN EXPERIENTAL, THERE IS NO ANY KIND OF GURANTEE ON IT
Tags: block msn, CISCO, Computing, dns, ios, Networking, policy map
类别: Computing, Networking
没有留言 »

