使用tcpcopy复制线上流量进行测试
- online server
- 线上服务所在机器 10.136.11.4
- 部署tcpcopy
sudo /usr/local/tcpcopy/sbin/tcpcopy -x ONLINE_PORT@ONLINE_SERVER_MAC_ADDR-10.136.11.5:TEST_PORT@TEST_SERVER_MAC_ADDR -s 10.136.11.3 -o eth4 -i eth4 -c 10.136.100.x -d -l ./tcpcopy.log
- target server
- 目标服务器,测试服务所在机器 10.136.11.5
- 设置路由
route add -net 10.136.100.0 netmask 255.255.255.0 gw 10.136.11.3
- assistant server - AS
- 辅助服务器 10.136.11.3
- 部署intercept
sudo /usr/local/intercept/sbin/intercept -i eth4 -F ‘tcp and src port TEST_PORT‘ -d -l ./inter.log
参考
https://github.com/session-replay-tools/tcpcopy
https://blog.csdn.net/wangbin579/article/details/10148247
https://blog.csdn.net/fengfengdiandia/article/details/77776026
https://www.jianshu.com/p/8df317dbf653
原文地址:https://www.cnblogs.com/wangzhiyi/p/10640060.html
时间: 2024-11-05 23:29:48