Files
mininet/cleanup
T
Bob Lantz eddef947a4 Organized routines into classes:
Node -> { Host, Switch, Controller }
Network -> { TreeNet, GridNet -> LinearNet }

Modified cleanup to clean up kernel datapaths.
2009-12-09 21:13:17 -08:00

21 lines
493 B
Bash
Executable File

#!/bin/bash
echo "Removing all links of the pattern foo-ethX"
for f in `ip link show | egrep -o '(\w+-eth\w+)' ` ; do
cmd="ip link del $f"
echo $smd
$cmd
done
echo "Removing excess controllers/ofprotocols/ofdatapaths/pings"
killall -9 controller ofprotocol ofdatapath ping 2> /dev/null
echo "Removing excess kernel datapath processes"
ps ax | grep 'dp[0-9]' | awk '{print $1;}' | xargs kill
echo "Removing vconn junk in /tmp"
rm -f /tmp/vconn* /tmp/vlogs* /tmp/*.out /tmp/*.log