⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wlan-goodput

📁 柯老师网站上找到的
💻
字号:
#!/bin/tcsh## works on a trace file produced by ns# outputs total goodput as a function of timeif ( $#argv != 2 ) then  echo usage:  echo "      " $0 \<scenario\> \<interval size\>  exit 1endifset scenario = $1set interval = $2# base analysis on the AGT layerset layer = AGTset tracefile = $scenario.trset outfile = $scenario.goodputrm -f $outfile# determine the time the first packet was sentset start = `egrep "^s .*\-Nl $layer " $tracefile | head -1 | gawk '{print $3;}'`# use number of bytes received over the last interval to calc# interval b/wegrep "^r .*\-Nl $layer " $tracefile |								\	gawk -v start=$start -v base=$start -v step=$interval -v outfile=$outfile '{		\		time = $3;									\		while (time > base) {								\			bw = bytes/step;							\			if (max < bw) max = bw;							\			printf "%.9f %.9f\n", base, bw >> outfile;				\			base += step;								\			bytes = 0;								\		}										\		total_bytes += $39;								\		bytes += $39;									\	} END {											\		step -= (base - time);								\		bw = bytes/step;								\		if (max < bw) max = bw;								\		printf "%.9f %.9f\n", time, bw >> outfile;					\		if (total_bytes)								\			printf "Total Goodput = %.3fKB/s\n", (total_bytes/1024.0)/(time-start);	\		else										\			printf "Total Goodput = 0.0KB/s\n";					\		printf "Max Goodput = %.3fKB/s\n", (max/1024.0);				\	}'

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -