![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
网络
Luhuadeng
这个作者很懒,什么都没留下…
展开
-
计算链路的吞吐量
计算吞吐率 下面的perl脚本可以计算ns2的跟踪文件out.tr中某个链路的吞吐量(Throughput)。 使用方法 ns2脚本 #number of connections set n_con 1 set ns [new Simulator] # Trace all packets event set tf [open out.tr w] $ns trace-all $tf #Define a 'finish' procedure proc finish {output_ } { upv原创 2021-01-20 13:05:36 · 1149 阅读 · 0 评论 -
NS2记录TCP流的窗口大小
NS2记录TCP流的窗口大小 下列代码将tcp_ 数组中每一条流的窗口大小每隔0.02秒进行一次采样,将采样时间和每一条流的窗口大小保存到output_数组对应的输出文件中。其中全局变量ns为模拟器,n_con为tcp流的数量。 proc record { tcp_ output_ } { upvar $tcp_ tcp upvar $output_ output global ns n_con #set the time after whic原创 2021-01-20 11:37:47 · 196 阅读 · 0 评论