Chinaunix首页 | 论坛 | 博客
  • 博客访问: 485672
  • 博文数量: 109
  • 博客积分: 2331
  • 博客等级: 大尉
  • 技术积分: 1062
  • 用 户 组: 普通用户
  • 注册时间: 2011-11-24 21:36
文章分类

全部博文(109)

文章存档

2015年(2)

2013年(1)

2012年(78)

2011年(28)

我的朋友

分类: LINUX

2012-02-07 19:53:13


  1. #author souroot
  2. #email: souroot@163.com
  3. #we use formular: (all the send packets in agents layer)
  4. #-(all the recieve packets in agents layer) as all the lost packets
  5. BEGIN{
  6.     send;
  7.     recv;
  8. }
  9. {
  10.     if(($1)=="s" && ($4)=="AGT")
  11.         send++;
  12.     if(($1)=="r" && ($4)=="AGT")
  13.         recv++;
  14. }
  15. END{
  16.     printf "send is %d, recv is %d\n",send,recv;
  17.     printf "drop rate is %4f\n",(send-recv)/send;
  18. }




阅读(1456) | 评论(0) | 转发(0) |
0

上一篇:awk 字符串函数

下一篇:路由失效计时器

给主人留下些什么吧!~~