0
|
1 #!/bin/bash
|
|
2
|
|
3 #rebuild
|
|
4 make
|
|
5
|
|
6 # shutdown bgpd
|
|
7 /sbin/service bgpd stop
|
|
8
|
|
9 # start the route flap detector
|
|
10 pid=/var/run/routeflapper.pid
|
|
11 mkdir -p /var/run/routeflapper
|
|
12 chmod 700 /var/run/routeflapper
|
|
13 #chown routeflapper:routeflapper /var/run/routeflapper
|
|
14
|
|
15 cd $(hostname)
|
|
16
|
|
17 #valgrind --leak-check=full --show-reachable=yes ../src/routeflapper -d 10
|
|
18 #valgrind --leak-check=full ../src/routeflapper -d 3
|
|
19 ../src/routeflapper -d 3
|
|
20 rm -f tracelog*
|
|
21 #strace -e trace=open,close,read,write -o tracelog -f -ff -x src/routeflapper -d 10
|
|
22 sleep 5
|
|
23 P2=`cat $pid`
|
|
24 echo started routeflapper as process $P2
|
|
25
|
|
26 # restart bgpd
|
|
27 /sbin/service bgpd start
|
|
28
|
|
29 echo "eventually, run the following kill command"
|
|
30 echo kill -SIGINT $P2
|