当前位置: 技术问答>linux和unix
linux下如何获得网络的数据传数量?
来源: 互联网 发布时间:2016-06-29
本文导语: 就是接受到多少字节,发送了多少字节,每秒的数据流量是多少?等等这些东西 | ifconfig eth0 Link encap:Ethernet HWaddr 00:23:54:99:8C:8C inet addr:192.168.168.116 Bcast:192.168.168.2...
就是接受到多少字节,发送了多少字节,每秒的数据流量是多少?等等这些东西
|
ifconfig
eth0 Link encap:Ethernet HWaddr 00:23:54:99:8C:8C
inet addr:192.168.168.116 Bcast:192.168.168.255 Mask:255.255.255.0
inet6 addr: fe80::223:54ff:fe99:8c8c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:94462 errors:0 dropped:0 overruns:0 frame:0
TX packets:63656 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:127453757 (121.5 MiB) TX bytes:6983333 (6.6 MiB)
Interrupt:220 Base address:0x8000
eth0 Link encap:Ethernet HWaddr 00:23:54:99:8C:8C
inet addr:192.168.168.116 Bcast:192.168.168.255 Mask:255.255.255.0
inet6 addr: fe80::223:54ff:fe99:8c8c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:94462 errors:0 dropped:0 overruns:0 frame:0
TX packets:63656 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:127453757 (121.5 MiB) TX bytes:6983333 (6.6 MiB)
Interrupt:220 Base address:0x8000
|
ifconfig看网卡的信息应该有这些数据量的
|
ifconfig是比较直观,但是不能看实时的流量!
|
cat /proc/net/dev
|
dstat