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

📄 getnoderecv.awk

📁 相关搜索: ns2仿真结果分析 all-awk ns2 ns2 无限网络中awk文件 ... [2.tcl.rar] - 在ns2平台上实现对AODV协议的模拟
💻 AWK
字号:
# getData.awkBEGIN {	if(step ==0)		step = 10;	base = 0;	start = 0;	bytes = 0;	total_bytes = 0;	max = 0;	calc = 0;}$0 ~/^s.* AGT/ {	if (base == 0 && $3 == ("_" src "_")) {		base = $2;		start = $2;		calc = 1;	}}$0 ~/^r.* AGT/ && calc == 1{ 	time = $2;	if (time > base) {		bw = bytes/(step * 1000.0);                if (max < bw) max = bw;                printf "%.9f %.9f\n", base, bw >> outfile;                base += step;                bytes = 0;        }	if ($3 == ("_" dst "_") && match($14,"." src ":") >=0 ) {		total_bytes += $8;		bytes += $8;	}}END {								if (total_bytes)		printf "# Avg B/w = %.3fKB/s\n", ((total_bytes/1000.0)/(time-start)) >> outfile;	else			printf "Avg B/w = 0.0KB/s\n";	printf "# Max B/w = %.3fKB/s\n", max >> outfile;		}

⌨️ 快捷键说明

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