Tcpreplay website: http://tcpreplay.synfin.net/trac/
Thursday, April 24, 2008
Tcpreplay
Tcpreplay可說是從事網通研發人員的一個好工具,它可以將libpcap format的封包記錄檔,重新reply出來,以利除錯或是regression test,不論是In-line mode或是Routing mode的device,它都有辦法可以將封包pass through device,除了replay,它還可透過tcprewrite修改封包的內容,這麼強大的工具您怎麼可以錯過呢?
Tcpreplay website: http://tcpreplay.synfin.net/trac/
Tcpreplay website: http://tcpreplay.synfin.net/trac/
Thursday, April 17, 2008
虛擬機器軟體大集合
今天發現到有個forum針對各家虛擬機器的軟體加以整理與介紹,非常棒!值得收藏起來。
Welcome : Links to get started with Virtualization
Tuesday, April 15, 2008
Linux下的partition magic: GParted
經過測試對ext3的partition做放大與縮小都沒有問題,至於FAT與NTFS就抱歉了,因為很少用Windows所以就不驗證了。
Gparted 官網:
http://gparted.sourceforge.net/
Ubuntu Wiki對於Gparted的教學文件:
http://wiki.ubuntu.org.tw/index.php/GParted
Gparted Live-CD:
http://gparted-livecd.tuxfamily.org/
Gparted 官網:
http://gparted.sourceforge.net/
Ubuntu Wiki對於Gparted的教學文件:
http://wiki.ubuntu.org.tw/index.php/GParted
Gparted Live-CD:
http://gparted-livecd.tuxfamily.org/
Saturday, April 12, 2008
固定指定的DNS Server
帽客自己在使用Linux作業系統時,當把NIC設定成透過DHCP Server取得IP時,往往會把我自己所指定好的DNS Server覆蓋掉成DHCP Server所配置的DNS Server address,近日拜讀Cd Chen大大的書時,發現到了一個參數PEERDNS,當在NIC設定檔中把它設定成PEERDNS=no時,那麼/etc/resolv.conf的nameserver就不會被覆蓋掉了。
Friday, April 11, 2008
Apache stress test tool
今天發現到一個針對Apache Web Server的壓力/效能測試工具,在此做個簡單的筆記:
Tools: ApacheBench
Function: 針對某一Web Server提出連線請求,並且在同一時間內可設定幾個連線請求
Usage: # ab -n N -c N http://server1.example.com/index.html
-c concurrency
Number of multiple requests to perform at a time. Default is one request at a time.
-n requests
Number of requests to perform for the benchmarking session. The default is to just perform
single request which usually leads to non-representative benchmarking results.
Executed Result:
[root@server2 ~]# ab -n 100 -c 100 https://10.5.40.195/script/login.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 10.5.40.195 (be patient).....done
Server Software: Apache
Server Hostname: 10.5.40.195
Server Port: 443
SSL/TLS Protocol: TLSv1/SSLv3,DHE-RSA-AES256-SHA,1024,256
Document Path: /script/login.php
Document Length: 5953 bytes
Concurrency Level: 100
Time taken for tests: 14.492808 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 635400 bytes
HTML transferred: 595300 bytes
Requests per second: 6.90 [#/sec] (mean)
Time per request: 14492.808 [ms] (mean)
Time per request: 144.928 [ms] (mean, across all concurrent requests)
Transfer rate: 42.78 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 680 5075 3167.2 4795 14099
Processing: 114 959 1238.7 540 6085
Waiting: 112 913 1240.5 506 6082
Total: 896 6035 3844.3 5503 14470
Percentage of the requests served within a certain time (ms)
50% 5503
66% 6735
75% 7557
80% 8250
90% 14178
95% 14334
98% 14444
99% 14470
100% 14470 (longest request)
Tools: ApacheBench
Function: 針對某一Web Server提出連線請求,並且在同一時間內可設定幾個連線請求
Usage: # ab -n N -c N http://server1.example.com/index.html
-c concurrency
Number of multiple requests to perform at a time. Default is one request at a time.
-n requests
Number of requests to perform for the benchmarking session. The default is to just perform
single request which usually leads to non-representative benchmarking results.
Executed Result:
[root@server2 ~]# ab -n 100 -c 100 https://10.5.40.195/script/login.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 10.5.40.195 (be patient).....done
Server Software: Apache
Server Hostname: 10.5.40.195
Server Port: 443
SSL/TLS Protocol: TLSv1/SSLv3,DHE-RSA-AES256-SHA,1024,256
Document Path: /script/login.php
Document Length: 5953 bytes
Concurrency Level: 100
Time taken for tests: 14.492808 seconds
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 635400 bytes
HTML transferred: 595300 bytes
Requests per second: 6.90 [#/sec] (mean)
Time per request: 14492.808 [ms] (mean)
Time per request: 144.928 [ms] (mean, across all concurrent requests)
Transfer rate: 42.78 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 680 5075 3167.2 4795 14099
Processing: 114 959 1238.7 540 6085
Waiting: 112 913 1240.5 506 6082
Total: 896 6035 3844.3 5503 14470
Percentage of the requests served within a certain time (ms)
50% 5503
66% 6735
75% 7557
80% 8250
90% 14178
95% 14334
98% 14444
99% 14470
100% 14470 (longest request)
Thursday, April 10, 2008
IP alias
在Linux實現IP alias,一般來說大家第一個想到的方法是使用ifconfig,但其實用ifconfig來做IP alias,當要查看IP address時,會dump出一大堆IP alias的介面(ethN:N),不太容易閱讀(最近的測試在網卡上bind 16384個IP),所幸可以使用ip指令來做IP alias,簡單又方便閱讀。
怎麼做呢?非常簡單,只要下達以下指令就好了:
# ip addr add 192.168.1.102/24 dev ethN (N代表0,1,2,.... i.e.網卡編號)
查看:
# ip addr show
192.168.1.102與192.168.1.103是IP alias,如果使用ifconfig來做的話,那麼將會多出兩個ethN:N。提醒一下如果是以ip指令來做IP alias時,使用ifconfig是查看不到IP alias的IP address.
怎麼做呢?非常簡單,只要下達以下指令就好了:
# ip addr add 192.168.1.102/24 dev ethN (N代表0,1,2,.... i.e.網卡編號)
查看:
# ip addr show
192.168.1.102與192.168.1.103是IP alias,如果使用ifconfig來做的話,那麼將會多出兩個ethN:N。提醒一下如果是以ip指令來做IP alias時,使用ifconfig是查看不到IP alias的IP address.
Subscribe to:
Posts (Atom)