This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo 3 > /proc/sys/vm/drop_caches | |
sync | |
err="not enough RAM" | |
mem=`free|grep Mem:|awk '{print $4}'` | |
swap=`free|grep Swap:|awk '{print $3}'` | |
test $mem -lt $swap && echo -e $err && exit 1 | |
swapoff -a && swapon -a && |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modprobe ifb | |
ip link set dev ifb0 up | |
tc qdisc del dev bond1 root | |
tc qdisc add dev bond1 root handle 2: prio | |
tc filter add dev bond1 parent 2: protocol ip u32 match u32 0 0 flowid ffff action mirred egress redirect dev ifb0 | |
tc filter add delete bond1 parent 2: protocol ip u32 match u32 0 0 flowid ffff action mirred egress redirect dev ifb0 |
NewerOlder