当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 8 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 【已解决】可以上网,但ifconfig不显示流量的问题
帖子发表于 : 2015-11-20 17:35 

注册: 2013-04-27 19:26
帖子: 295
系统: ubuntu+win7
送出感谢: 21
接收感谢: 9
不知道什么时候出现的问题,无意间发现自己的有限网卡不能统计流量了(发送字节和接受字节显示始终为0),上网功能正常。

代码:
$ ifconfig
eth0      Link encap:以太网  硬件地址 8c:89:a5:0b:b7:3a 
          inet 地址:10.1.145.24  广播:10.1.145.255  掩码:255.255.255.0
          inet6 地址: fe80::8e89:a5ff:fe0b:b73a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  跃点数:1
          接收数据包:0 错误:0 丢弃:0 过载:0 帧数:0
          发送数据包:0 错误:0 丢弃:0 过载:0 载波:0
          碰撞:0 发送队列长度:1000
          接收字节:0 (0.0 B)  发送字节:0 (0.0 B)
          中断:19


请问有人知道这是哪里的问题么?


============================================================
根据4楼vickycq的解决方案,更换了内核,现在一切正常!
感谢所有帮助我的朋友。


最后由 恒河沙数1 编辑于 2016-01-29 9:40,总共编辑了 1 次

页首
 用户资料  
 
2 楼 
 文章标题 : Re: 可以上网,但ifconfig不显示流量的问题
帖子发表于 : 2015-11-20 17:39 
头像

注册: 2011-03-20 13:12
帖子: 4519
地址: 山东省寿光县
系统: Debian
送出感谢: 105
接收感谢: 997
代码:
cat /etc/os-release
uname -a
lspci -knn
sudo lshw -C network
cat /proc/net/dev

把结果全部复制贴上来


_________________
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户


页首
 用户资料  
 
3 楼 
 文章标题 : Re: 可以上网,但ifconfig不显示流量的问题
帖子发表于 : 2015-11-20 23:04 

注册: 2013-04-27 19:26
帖子: 295
系统: ubuntu+win7
送出感谢: 21
接收感谢: 9
vickycq 写道:
代码:
cat /etc/os-release
uname -a
lspci -knn
sudo lshw -C network
cat /proc/net/dev

把结果全部复制贴上来


补充一点, 我使用了https://github.com/oblique/create_ap的wifi热点工具,不确定是不是它引起的。
下面出现的mon.wlan0就是有线网通过wifi分享出来的连接。

代码:
$ ifconfig
eth0      Link encap:以太网  硬件地址 8c:89:a5:0b:b7:3a 
          inet 地址:10.1.145.24  广播:10.1.145.255  掩码:255.255.255.0
          inet6 地址: fe80::8e89:a5ff:fe0b:b73a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  跃点数:1
          接收数据包:0 错误:0 丢弃:0 过载:0 帧数:0
          发送数据包:0 错误:0 丢弃:0 过载:0 载波:0
          碰撞:0 发送队列长度:1000
          接收字节:0 (0.0 B)  发送字节:0 (0.0 B)
          中断:19

lo        Link encap:本地环回 
          inet 地址:127.0.0.1  掩码:255.0.0.0
          inet6 地址: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  跃点数:1
          接收数据包:916 错误:0 丢弃:0 过载:0 帧数:0
          发送数据包:916 错误:0 丢弃:0 过载:0 载波:0
          碰撞:0 发送队列长度:0
          接收字节:90830 (90.8 KB)  发送字节:90830 (90.8 KB)

mon.wlan0 Link encap:未指定  硬件地址 24-0A-64-37-FA-A7-3A-30-00-00-00-00-00-00-00-00 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  跃点数:1
          接收数据包:671 错误:0 丢弃:0 过载:0 帧数:0
          发送数据包:0 错误:0 丢弃:0 过载:0 载波:0
          碰撞:0 发送队列长度:1000
          接收字节:88115 (88.1 KB)  发送字节:0 (0.0 B)

wlan0     Link encap:以太网  硬件地址 24:0a:64:37:fa:a7 
          inet 地址:192.168.12.1  广播:192.168.12.255  掩码:255.255.255.0
          inet6 地址: fe80::260a:64ff:fe37:faa7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  跃点数:1
          接收数据包:10581 错误:0 丢弃:1 过载:0 帧数:0
          发送数据包:12533 错误:0 丢弃:0 过载:0 载波:0
          碰撞:0 发送队列长度:1000
          接收字节:1200872 (1.2 MB)  发送字节:15971001 (15.9 MB)



代码:
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="14.04.3 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.3 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"



代码:
$ uname -a
Linux regis-PC 3.13.0-68-generic #111-Ubuntu SMP Fri Nov 6 18:17:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


代码:
$ lspci -knn
00:00.0 Host bridge [0600]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller [8086:0c04] (rev 06)
   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
   Kernel driver in use: pcieport
00:02.0 VGA compatible controller [0300]: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller [8086:0416] (rev 06)
   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
   Kernel driver in use: i915
00:03.0 Audio device [0403]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller [8086:0c0c] (rev 06)
   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
   Kernel driver in use: snd_hda_intel
00:14.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI [8086:8c31] (rev 04)
   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
   Kernel driver in use: xhci_hcd
00:16.0 Communication controller [0780]: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 [8086:8c3a] (rev 04)
   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
   Kernel driver in use: mei_me
00:1a.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 [8086:8c2d] (rev 04)
   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
   Kernel driver in use: ehci-pci
00:1b.0 Audio device [0403]: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller [8086:8c20] (rev 04)
   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
   Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 [8086:8c10] (rev d4)
   Kernel driver in use: pcieport
00:1c.3 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 [8086:8c16] (rev d4)
   Kernel driver in use: pcieport
00:1c.4 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 [8086:8c18] (rev d4)
   Kernel driver in use: pcieport
00:1c.5 PCI bridge [0604]: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #6 [8086:8c1a] (rev d4)
   Kernel driver in use: pcieport
00:1d.0 USB controller [0c03]: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 [8086:8c26] (rev 04)
   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
   Kernel driver in use: ehci-pci
00:1f.0 ISA bridge [0601]: Intel Corporation HM87 Express LPC Controller [8086:8c4b] (rev 04)
   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
   Kernel driver in use: lpc_ich
00:1f.2 SATA controller [0106]: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] [8086:8c03] (rev 04)
   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
   Kernel driver in use: ahci
00:1f.3 SMBus [0c05]: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller [8086:8c22] (rev 04)
   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
01:00.0 3D controller [0302]: NVIDIA Corporation GK107M [GeForce GT 750M] [10de:0fe4] (rev a1)
   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
   Kernel driver in use: nvidia
03:00.0 Ethernet controller [0200]: Qualcomm Atheros Killer E2200 Gigabit Ethernet Controller [1969:e091] (rev 13)
   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
   Kernel driver in use: alx
04:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader [10ec:5227] (rev 01)
   Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
   Kernel driver in use: rtsx_pci
05:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723AE PCIe Wireless Network Adapter [10ec:8723]
   Subsystem: AzureWave Device [1a3b:2114]
   Kernel driver in use: rtl8723ae


代码:
$ sudo lshw -C network
[sudo] password for regis:
  *-network               
       description: Ethernet interface
       product: Killer E2200 Gigabit Ethernet Controller
       vendor: Qualcomm Atheros
       physical id: 0
       bus info: pci@0000:03:00.0
       logical name: eth0
       version: 13
       serial: 8c:89:a5:0b:b7:3a
       size: 100Mbit/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.1.145.24 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s
       resources: irq:48 memory:f7a00000-f7a3ffff ioport:d000(size=128)
  *-network
       description: Wireless interface
       product: RTL8723AE PCIe Wireless Network Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: mon.wlan0
       version: 00
       serial: 24:0a:64:37:fa:a7
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list logical wireless ethernet physical
       configuration: broadcast=yes driver=rtl8723ae driverversion=3.13.0-68-generic firmware=N/A ip=192.168.12.1 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn
       resources: irq:17 ioport:c000(size=256) memory:f7800000-f7803fff



代码:
$ cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
mon.wlan0:   74058     560    0    0    0     0          0         0        0       0    0    0    0     0       0          0
  eth0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
    lo:   86828     876    0    0    0     0          0         0    86828     876    0    0    0     0       0          0
 wlan0:  994041    7317    0    1    0     0          0         0  8245235    7308    0    0    0     0       0          0


页首
 用户资料  
 
4 楼 
 文章标题 : Re: 可以上网,但ifconfig不显示流量的问题
帖子发表于 : 2015-11-20 23:25 
头像

注册: 2011-03-20 13:12
帖子: 4519
地址: 山东省寿光县
系统: Debian
送出感谢: 105
接收感谢: 997
引用:
03:00.0 Ethernet controller [0200]: Qualcomm Atheros Killer E2200 Gigabit Ethernet Controller [1969:e091] (rev 13)
Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
Kernel driver in use: alx


果然是 Atheros 的芯片组。这里有人遇到类似的情况:
http://unix.stackexchange.com/questions/148857/network-interface-counters-not-working
具体型号不同,但问题大体相似

原来 3.10~3.13 内核的 alx 驱动有无法正确统计流量的 bug:
http://www.spinics.net/lists/netdev/msg245544.html
https://bbs.archlinux.org/viewtopic.php?id=166555

这个问题已于 3.14-rc1 修复:
https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/log/?qt=grep&q=alx%3A+add
https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=f9577a376e28d7b8367319e103d6511d41c1c5fa

解决方案
安装一个 >3.13 的内核试试。如 linux-image-3.16.0-53-generic
注意各类闭源驱动。不要移除现有的内核。

14.04 可用的内核:
http://packages.ubuntu.com/search?suite=trusty&section=all&arch=any&keywords=linux-image-generic-lts&searchon=names


_________________
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户



_________________
评价: 3.7% 恒河沙数1
 
页首
 用户资料  
 
5 楼 
 文章标题 : Re: 可以上网,但ifconfig不显示流量的问题
帖子发表于 : 2015-11-21 0:25 

注册: 2013-04-27 19:26
帖子: 295
系统: ubuntu+win7
送出感谢: 21
接收感谢: 9
vickycq 写道:
引用:
03:00.0 Ethernet controller [0200]: Qualcomm Atheros Killer E2200 Gigabit Ethernet Controller [1969:e091] (rev 13)
Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10e6]
Kernel driver in use: alx


果然是 Atheros 的芯片组。这里有人遇到类似的情况:
http://unix.stackexchange.com/questions/148857/network-interface-counters-not-working
具体型号不同,但问题大体相似

原来 3.10~3.13 内核的 alx 驱动有无法正确统计流量的 bug:
http://www.spinics.net/lists/netdev/msg245544.html
https://bbs.archlinux.org/viewtopic.php?id=166555

这个问题已于 3.14-rc1 修复:
https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/log/?qt=grep&q=alx%3A+add
https://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=f9577a376e28d7b8367319e103d6511d41c1c5fa

解决方案
安装一个 >3.13 的内核试试。如 linux-image-3.16.0-53-generic
注意各类闭源驱动。不要移除现有的内核。

14.04 可用的内核:
http://packages.ubuntu.com/search?suite=trusty&section=all&arch=any&keywords=linux-image-generic-lts&searchon=names



非常感谢,想请教一下,我看到3.13,3.16,3.19,4.2都对Ubuntu14.04有支持,我该依据什么标准选择一个适合我的呢?还是随便装一个,只要各种驱动没问题就行?


页首
 用户资料  
 
6 楼 
 文章标题 : Re: 可以上网,但ifconfig不显示流量的问题
帖子发表于 : 2015-11-21 1:02 
头像

注册: 2011-03-20 13:12
帖子: 4519
地址: 山东省寿光县
系统: Debian
送出感谢: 105
接收感谢: 997
其实都可以。但若没有追新的需求(为新硬件寻求支持等),升级跨度不必太大。若系统里有闭源驱动,内核变动太大还可能引发问题。
只要保留现有内核不移除,不必担心出问题。


_________________
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户


页首
 用户资料  
 
7 楼 
 文章标题 : Re: 可以上网,但ifconfig不显示流量的问题
帖子发表于 : 2015-11-21 22:42 

注册: 2013-04-27 19:26
帖子: 295
系统: ubuntu+win7
送出感谢: 21
接收感谢: 9
vickycq 写道:
其实都可以。但若没有追新的需求(为新硬件寻求支持等),升级跨度不必太大。若系统里有闭源驱动,内核变动太大还可能引发问题。
只要保留现有内核不移除,不必担心出问题。


知道啦,谢谢你了。


页首
 用户资料  
 
8 楼 
 文章标题 : Re: 可以上网,但ifconfig不显示流量的问题
帖子发表于 : 2015-12-19 23:54 

注册: 2015-03-09 9:22
帖子: 10
系统: ubuntu
送出感谢: 1
接收感谢: 0 次
mark 下,关键词ifconfig统计网卡流量,内核驱动问题,需更换内核。


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 8 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 0 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译