1.循环测试访问页面的下载速度,并将速度数据存入bps文件中:
#echo $(date +%s) > start-time; URL=http://www.google.com; while true; do echo $(curl -L --w %{speed_download} -o/dev/null -s $URL) >> bps; sleep 10; done &2.使用gnuplot将测试后的数据bps绘图
#gnuplot -persist <(echo "plot 'bps' with lines")关于gnuplot