zoukankan      html  css  js  c++  java
  • ifstat命令行统计网络流量

     
      tar xzvf ifstat-1.1.tar.gz
      cd ifstat-1.1
      ./configure
      make
      make install
    都是老套路,别和我说你没装gcc .
    然后 man ifstat
    -t 显示时间 格式:HH:MM:SS   
    -i 指定的网卡 ,如果有多块网卡 以","分隔
    -T 显示所有接口的带宽.
    # ifstat -t -i tun0,tun1 -T    
      Time           tun0                tun1               Total       
    HH:MM:SS   KB/s in  KB/s out   KB/s in  KB/s out   KB/s in  KB/s out
    06:38:02      6.25      0.29          1.43      1.18          7.67      1.47
    06:38:03      0.74      0.96          2.59      6.07          3.33      7.02
    06:38:04     13.37         0.85          7.07      0.81         20.44      1.66
    06:38:05      8.15      1.14          3.46      2.24         11.61      3.38
    06:38:06      3.26      1.18         13.48     1.20         16.73      2.37
    06:38:07      0.57      0.65         1.67       0.19           2.24      0.84
    06:38:08      1.36      0.57         0.05       0.10           1.41      0.67
    06:38:09      0.23      0.10         0.18       0.00           0.41      0.10
    06:38:10      0.54      0.19         0.51       1.13           1.05      1.32
    06:38:11      1.08      0.50        1.24        0.12           2.33      0.62
  • 相关阅读:
    PHP使用iconv函数遍历数组转换字符集
    ping localhost出现地址::1
    在 Windows 7 中禁用IPv6协议/IPv6隧道
    ping localhost 返回 ::1的导致不能打开http://localhost的原因及解决
    [LeetCode] Climbing Stairs
    [LeetCode] Binary Tree Level Order Traversal II
    [LeetCode] Set Mismatch
    [LeetCode] Power of Four
    [LeetCode] Power of Three
    [LeetCode] Power of Two
  • 原文地址:https://www.cnblogs.com/songyanlei/p/3443717.html
Copyright © 2011-2022 走看看