返回

为方便读者,本教材中连续四行及以上程序源码(脚本),本网站将直接提供,直接输入使用。

(1)第18页倒数第13行开始9行代码如下:
set term eps
set out "result.eps"
set size 1,0.7
set key right bottom
set xrange [0:50]
set ylabel "吞吐量(KBps)"
set xlabel "时间(s)"
plot "hidden.d" u 1:2 w lp lw 2 lc rgb "black" t "Flow 1:n0->n1", "hidden.d" u 1:3 w lp lw 2 lc rgb "grey" t "Flow 1:n2->n1"
(2)第19页第1行开始14行代码如下:
BEGIN {
	sendLine = 0;
	recvLine = 0;
}
$0 ~/^s.* AGT/ {
	sendLine++;
}
$0 ~/^r.* AGT/{
	recvLine++;
}
END {
        printf "Sent: %d Received: %d, Delivery Ratio:%.4f\n", sendLine, recvLine, (recvLine/sendLine);
}
(3)第23页倒数第11行开始9行代码如下:
set term png
set out "result.png"
set key right bottom
set xrange [0:50]
set ylabel "吞吐量(KBps)"
set xlabel "时间(s)"
plot "exposed.d" u 1:2 w lp lw 2 lc rgb "black" t "Flow 1:n0->n1","exposed.d" u 1:3 w lp lw 2 lc rgb "grey" t "Flow 1:n2->nl"