V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
mnday
V2EX  ›  问与答

有在用 vnstat 工具统计流量的吗?

  •  
  •   mnday · 51 天前 · 903 次点击
    这是一个创建于 51 天前的主题,其中的信息可能已经有所发展或是发生改变。

    刚开始用没多久,看起来不咋准的样子,为什么总计和 total 相加差那么多。:(

    root@xxxxx:~# vnstat -d -i eth0

    eth0 / daily

          day        rx      |     tx      |    total    |   avg. rate
     ------------------------+-------------+-------------+---------------
     2025-07-29   497.47 MiB |  374.28 MiB |  871.75 MiB |   84.64 kbit/s
     2025-07-30    19.95 GiB |   16.04 GiB |   36.00 GiB |    3.58 Mbit/s
     2025-07-31    13.57 GiB |    9.99 GiB |   23.56 GiB |    2.34 Mbit/s
     2025-08-01    16.75 GiB |   13.93 GiB |   30.69 GiB |    3.05 Mbit/s
     2025-08-02    10.27 GiB |    7.64 GiB |   17.91 GiB |    1.78 Mbit/s
     2025-08-03    16.42 GiB |   13.77 GiB |   30.19 GiB |    3.00 Mbit/s
     2025-08-04    21.98 GiB |   20.12 GiB |   42.10 GiB |    4.55 Mbit/s
     ------------------------+-------------+-------------+---------------
      estimated    23.89 GiB |   21.87 GiB |   45.76 GiB |
    
    6 条回复    2025-08-05 09:25:56 +08:00
    sleepm
        1
    sleepm  
       51 天前
    横着看的,一行一天
    最下面一行是预估当天的
    WAHSUN
        2
    WAHSUN  
       51 天前 via iPhone
    一直在用,尤其是服务器上面。

    eth0 / yearly

    year rx | tx | total | avg. rate
    ------------------------+-------------+-------------+---------------
    2024 760.40 GiB | 724.28 GiB | 1.45 TiB | 403.30 kbit/s
    2025 1.90 TiB | 1.92 TiB | 3.82 TiB | 1.80 Mbit/s
    ------------------------+-------------+-------------+---------------
    estimated 3.21 TiB | 3.24 TiB | 6.45 TiB |
    mnday
        3
    mnday  
    OP
       51 天前
    @sleepm 我知道。。。只是你发现没有我贴的数据的 total 的总和不对没有?
    mnday
        4
    mnday  
    OP
       51 天前
    @WAHSUN 你这个总计也不对吧?
    sparkssssssss
        5
    sparkssssssss  
       51 天前
    total=rx+tx
    没毛病吧
    下面的 estimated 是预估当天的流量,没看出哪里有问题
    WAHSUN
        6
    WAHSUN  
       51 天前 via iPhone
    你指的是 estimated 3.21 TiB | 3.24 TiB | 6.45 TiB |这一组数据吧?这是预估的数据,Vnstat 官网: https://humdi.net/vnstat/
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3107 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 11:42 · PVG 19:42 · LAX 04:42 · JFK 07:42
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.