我试图模拟网络(比特率:200kbps,数据包损失:0.03,延迟:400毫秒),我正在使用netem.
tc qdisc add dev eth1 root handle 1:0 netem delay 400ms loss 0.03%
tc qdisc add dev eth1 parent 1:1 handle 10: tbf rate 200kbit buffer 1600 limit 3000
Run Code Online (Sandbox Code Playgroud)
当我运行这个我得到错误说明
RTNETLINK answers: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我哪里错了?我怎么能做得更好?
我需要使用python脚本/自动化交互式终端客户端.客户端接受三个参数并运行如下:
>./myclient <arg1> <arg2> <arg3>
Welcome...
blah...
blah..
[user input]
some more blah... blah... for the input entered
blah..
blah..
[basically it accepts input and puts the output in the console until the user types 'quit']
Run Code Online (Sandbox Code Playgroud)
现在我需要在python中自动执行此操作并将控制台输出保存在文件中.
对此有任何帮助,我们非常感谢...