This is my makefile:
delay:
tc qdisc add dev eth0 root netem delay 0ms
test4_s_delay:delay
./a.out 10 10 1 2 3 1 1 20 | tee server_delay.txt
However, I am getting the following error on execution of the makefile:
root@superwii-laptop:/开发者_开发技巧home/superwii/Desktop/Amogh# make test4_s_delay
tc qdisc add dev eth0 root netem delay 0ms
RTNETLINK answers: File exists
make: *** [delay] Error 2
I am unable to get past this error. Please help.
You would get this error, if qdisc root node already exists.
Try deleting the root qdisc
sudo tc qdisc del dev eth0 root
and try again
Looks like your executable tc
is exiting with non-zero value of 2
.
Try running the command tc qdisc add dev eth0 root netem delay 0ms
and see if it runs fine.
use replace instead of add
tc qdisc replace dev eth0 root netem delay. Man page for tc says :
replace performs a nearly atomic remove/add on an existing node id. If the node does not exist yet it is created.
精彩评论