有没有人可以说dstat的networking指标( dstat -n
)? 是字节还是比特? 非常感谢!
我的猜测是它是字节,因为输出显示B
,位将是b
:
-net/total- recv send 0 0 2376B 725B 1523B 180B
但是,手册中没有任何内容证实这一点。
字节..至少从版本.3。 来自changelog:
有趣的是..在0.7.2svn他们添加位选项
我确认网络度量单位是Bytes/sec
方法:我跑了一些网络I / O流量,并用dstat
测量
[root@centos72_base ~]# dstat --full You did not select any stats, using -cdngy by default. -------cpu0-usage--------------cpu1-usage------ --dsk/sda-- net/eno1677 ---paging-- ---system-- usr sys idl wai hiq siq:usr sys idl wai hiq siq| read writ| recv send| in out | int csw 4 0 96 0 0 0: 1 0 99 0 0 0| 0 0 |1205k 9874B| 0 0 | 562 601 4 0 96 0 0 0: 0 0 100 0 0 0| 0 0 |1206k 10k| 0 0 | 529 656 4 1 95 0 0 0: 4 0 96 0 0 0| 0 0 |1206k 10k| 0 0 | 580 712 3 0 97 0 0 0: 2 0 98 0 0 0| 0 0 |1207k 10k| 0 0 | 506 615
在稳定状态下,我平均为1206k
。 我输出dtsat
到CSV来查看完整的数字,并得到了完整的值,如1234196
。
接下来,我使用ifconfig
获得了网络指标。
[cyc@centos72_base one_forward]$ ifconfig; sleep 1; ifconfig; sleep 1; ifconfig RX packets 18500852 bytes 42118560051 (39.2 GiB) ... RX packets 18501061 bytes 42119793977 (39.2 GiB) ... RX packets 18501286 bytes 42121029469 (39.2 GiB)
ifconfig
明确指出网络指标是千兆字节。 计算两个连续秒之间的差值: 42119793977 - 42118560051 = 1233926
。 1233926 Bytes/sec
从ifconfig
密切匹配1234196
从dstat
1233926 Bytes/sec
。 所以dstat
以Bytes/sec
输出