使用tcpcopy進行壓力測試

tcpcopy介紹:http://www.searchtb.com/2012/05/using-tcpcopy-to-simulate-traffic.htmlhtml

軟件下載地址:https://github.com/wangbin579/tcpcopy/downloadsgit

安裝:github

tar -zxvf tcpcopy-0.6.5 . tar .gz
cd tcpcopy-0.6.5
. /configure  --prefix=/home/test
make
make install
 
使用:
設有A、B兩臺機器,A爲線上機器,B爲測試機器,如今要把A上的流量複製到B上進行壓力測試。
一、在B上執行
  #modprobe ip_queue
  #iptables -I OUTPUT -p tcp --sport <port> -j QUEUE
  #intercept &
二、在A上執行(能夠經過tcpcopy -h查看幫助和示例)
tcpcopy  -x <源port>-<目的ip>:<目的port> -n 10
 
這樣就能夠將A機器的流量複製到B上。
相關文章
相關標籤/搜索