首先,我在两个 shell 中同时运行 vnstat -tr -i eth0 和 iftop。奇怪的是,vnstat 中的 rx 比 iftop 中的峰值 rx 大得多。我该如何解决这个问题?
vnstat 中的接收
5679980 packets sampled in 5 seconds
Traffic average for eth0
rx 530.52 Mbit/s 1130727 packets/s
tx 49.88 Mbit/s 5258 packets/s
iftop 中的接收
TX: cum: 205MB peak: 47.1Mb
RX: 10.9MB 9.30Mb
TOTAL: 217MB 52.2Mb
最佳答案
伙计,vnstat 中的 RX 使用 MegaBit(Mbit);而 iftop 使用兆字节(MB)。他们的测量方式不同,结果当然不会相同。
1 字节 = 8 位
您可以在 google 中获取有关“Mbit vs MB”的更多信息。搜索一下就可以了。
关于linux - vnstat rx 和 iftop rx 不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29257212/