Statistics
| Branch: | Tag: | Revision:

mininet / cleanup @ 08cef003

History | View | Annotate | Download (630 Bytes)

1
#!/bin/bash
2

    
3
echo "Removing all links of the pattern foo-ethX"
4

    
5
for f in `ip link show | egrep -o '(\w+-eth\w+)' ` ; do  
6
  cmd="ip link del $f"
7
  echo $smd
8
  $cmd
9
done
10

    
11
echo "Removing excess controllers/ofprotocols/ofdatapaths/pings"
12
killall -9 controller ofprotocol ofdatapath ping 2> /dev/null
13

    
14
echo "Removing excess kernel datapath processes"
15
ps ax | egrep -o 'dp[0-9]+' | sed 's/dp/nl:/' | xargs -l1 echo dpctl deldp 
16

    
17
echo "Removing vconn junk in /tmp"
18
rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log
19

    
20
echo "Removing old screen sessions"
21
screen -ls | egrep -o '[0-9]+\.[hsc][0-9]+' | sed 's/\.[hsc][0-9]*//g' | kill -9
22