ns-3学习手记16_利用awk对ns3中的记录文件.tr中的数据,进行分析,并利用gnuplot绘图

参考链接:
https://blog.csdn.net/qq_41067397/article/details/90401657
可直接查看参考链接,更详细。

1,首先是安装:

sudo apt-get install gawk

2,进行处理:

larry@larry-VirtualBox:~/repos/ns-3-allinone/ns-3.28$ gawk -f scratch/delay.awk tcp-four.tr > myDelay

3,进入gnuplot进行画图

larry@larry-VirtualBox:~/repos/ns-3-allinone/ns-3.28$ gnuplot

	G N U P L O T
	Version 5.0 patchlevel 3    last modified 2016-02-21 

	Copyright (C) 1986-1993, 1998, 2004, 2007-2016
	Thomas Williams, Colin Kelley and many others

	gnuplot home:     http://www.gnuplot.info
	faq, bugs, etc:   type "help FAQ"
	immediate help:   type "help"  (plot window: hit 'h')

Terminal type set to 'qt'
gnuplot> set terminal png size 640,480
Terminal type set to 'png'
Options are 'nocrop enhanced size 640,480 font "/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf,12" '
gnuplot> set xlabel "time/s"
gnuplot> set ylabel "delay/s"
gnuplot> set output "tcp-4-delay.png"
gnuplot> plot "myDelay" using 1:2 title "delay" with linespoints pointtype 2

  • 1
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值