#!/bin/sh set -e cd $(dirname $0) outfile=$1 sleep 5 # Let the system settle after booting. sudo cpuset -s 1 -l 0 iperf -D -s >/dev/null # daemonize iperf -c localhost -y C -t $((35 * 30)) -i 30 > $outfile killall iperf # "Interrupt again for force quit." killall iperf shutdown -r now