网络流量报告为零字节

刚刚安装了Ubuntu Server 13.10。 我正在设置一些脚本来帮助我监控服务器的活动。 现在我发现网络流量保持在零字节。

这就是我的意思:/ proc / net / dev说:

@boson:~ $ cat /proc/net/dev Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed p17p1: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 lo: 1184 16 0 0 0 0 0 0 1184 16 0 0 0 0 0 0 

对于那些想知道:

 @boson:~ $ lspci | grep Ethernet 02:00.0 Ethernet controller: Qualcomm Atheros QCA8171 Gigabit Ethernet (rev 10) 

 @boson:~ $ uname -a Linux boson 3.11.0-15-generic #25-Ubuntu SMP Thu Jan 30 17:22:01 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux 

 @boson:~ $ cat /sys/class/net/p17p1/statistics/* 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 

 @boson:~ $ netstat -i Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg lo 65536 0 16 0 0 0 16 0 0 0 LRU p17p1 1500 0 0 0 0 0 0 0 0 0 BMRU 

 @boson:~ $ sudo lshw : *-network description: Ethernet interface product: QCA8171 Gigabit Ethernet vendor: Qualcomm Atheros physical id: 0 bus info: pci@0000:02:00.0 logical name: p17p1 version: 10 serial: bc:5f:f4:ea:0e:28 size: 1Gbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm pciexpress msi msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=alx duplex=full ip=10.0.1.220 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s resources: irq:51 memory:ff600000-ff63ffff ioport:e000(size=128) : 

臭名昭着的alx模块也许?

 @boson:~ $ modinfo alx filename: /lib/modules/3.11.0-17-generic/kernel/drivers/net/ethernet/atheros/alx/alx.ko license: GPL description: Qualcomm Atheros(R) AR816x/AR817x PCI-E Ethernet Network Driver author: Qualcomm Corporation,  author: Johannes Berg  srcversion: B18081BDFB465ACD502D031 alias: pci:v00001969d000010A0sv*sd*bc*sc*i* alias: pci:v00001969d000010A1sv*sd*bc*sc*i* alias: pci:v00001969d00001090sv*sd*bc*sc*i* alias: pci:v00001969d0000E091sv*sd*bc*sc*i* alias: pci:v00001969d00001091sv*sd*bc*sc*i* depends: mdio intree: Y vermagic: 3.11.0-17-generic SMP mod_unload modversions 

有关如何使计数器工作的任何线索都是受欢迎的。

统计数据回到3.14rc1。

来源: https : //bugzilla.kernel.org/show_bug.cgi?id = 63401