暂无图片
暂无图片
1
暂无图片
暂无图片
暂无图片

查看网络丢包问题

原创 jieguo 2024-04-26
368

常用命令:

看是否有errors
[mqm@yclb ~]$ netstat -s|grep "error"
    0 packet receive errors
    0 receive buffer errors
    0 send buffer errors
看是否有ERR/DRP
[mqm@yclb ~]$ netstat -in
Kernel Interface table
Iface             MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
bond0            1500  9704311      0      0 0        518412      0      0      0 BMmRU
bond0:1          1500      - no statistics available -                        BMmRU
bond1            1500      363      0      0 0            12      0      0      0 BMmRU
eno1             1500    16452      0      0 0         12718      0      0      0 BMsRU
eno2             1500     1143      0      0 0           962      0      0      0 BMsRU
eno3             1500  5066569      0      0 0        470272      0      0      0 BMsRU
eno4             1500  4643927      0      0 0         48146      0      0      0 BMsRU
ens106f0         1500        0      0      0 0             0      0      0      0 BMU
ens106f1         1500        0      0      0 0             0      0      0      0 BMU
ens107f0         1500        0      0      0 0             0      0      0      0 BMU
ens107f1         1500        0      0      0 0             0      0      0      0 BMU
lo              65536     2154      0      0 0          2154      0      0      0 LRU
看是否有异常:
[mqm@yclb ~]$ sar -n EDEV 1 5
Linux 3.10.0-1160.el7.x86_64 (yclb)     04/26/2024      _x86_64_        (128 CPU)

10:56:25 AM     IFACE   rxerr/s   txerr/s    coll/s  rxdrop/s  txdrop/s  txcarr/s  rxfram/s  rxfifo/s  txfifo/s
10:56:26 AM     bond1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:26 AM      eno1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:26 AM      eno2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:26 AM      eno3      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:26 AM      eno4      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:26 AM     bond0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:26 AM        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:26 AM  ens107f0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:26 AM  ens107f1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:26 AM  ens106f0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:26 AM  ens106f1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00

10:56:26 AM     IFACE   rxerr/s   txerr/s    coll/s  rxdrop/s  txdrop/s  txcarr/s  rxfram/s  rxfifo/s  txfifo/s
10:56:27 AM     bond1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:27 AM      eno1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:27 AM      eno2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:27 AM      eno3      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:27 AM      eno4      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:27 AM     bond0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:27 AM        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:27 AM  ens107f0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:27 AM  ens107f1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:27 AM  ens106f0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:27 AM  ens106f1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00

10:56:27 AM     IFACE   rxerr/s   txerr/s    coll/s  rxdrop/s  txdrop/s  txcarr/s  rxfram/s  rxfifo/s  txfifo/s
10:56:28 AM     bond1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:28 AM      eno1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:28 AM      eno2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:28 AM      eno3      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:28 AM      eno4      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:28 AM     bond0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:28 AM        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:28 AM  ens107f0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:28 AM  ens107f1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:28 AM  ens106f0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:28 AM  ens106f1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00

10:56:28 AM     IFACE   rxerr/s   txerr/s    coll/s  rxdrop/s  txdrop/s  txcarr/s  rxfram/s  rxfifo/s  txfifo/s
10:56:29 AM     bond1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:29 AM      eno1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:29 AM      eno2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:29 AM      eno3      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:29 AM      eno4      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:29 AM     bond0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:29 AM        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:29 AM  ens107f0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:29 AM  ens107f1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:29 AM  ens106f0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:29 AM  ens106f1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00

10:56:29 AM     IFACE   rxerr/s   txerr/s    coll/s  rxdrop/s  txdrop/s  txcarr/s  rxfram/s  rxfifo/s  txfifo/s
10:56:30 AM     bond1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:30 AM      eno1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:30 AM      eno2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:30 AM      eno3      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:30 AM      eno4      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:30 AM     bond0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:30 AM        lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:30 AM  ens107f0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:30 AM  ens107f1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:30 AM  ens106f0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
10:56:30 AM  ens106f1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00

Average:        IFACE   rxerr/s   txerr/s    coll/s  rxdrop/s  txdrop/s  txcarr/s  rxfram/s  rxfifo/s  txfifo/s
Average:        bond1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:         eno1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:         eno2      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:         eno3      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:         eno4      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:        bond0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:           lo      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:     ens107f0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:     ens107f1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:     ens106f0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:     ens106f1      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
查看Link Failure Count情况:
[root@yclb net]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eno4
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eno4
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 74:5d:22:d7:d7:e9
Slave queue ID: 0

Slave Interface: eno3
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 74:5d:22:d7:d7:e8
Slave queue ID: 0
[root@yclb net]# 
[mqm@yclb ~]$ ethtool bond0
Settings for bond0:
        Supported ports: [ ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Supported FEC modes: Not reported
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: Other
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
Cannot get wake-on-lan settings: Operation not permitted
        Link detected: yes
[mqm@yclb ~]$ ethtool eno3
Settings for eno3:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: on (auto)
Cannot get wake-on-lan settings: Operation not permitted
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes
[mqm@yclb ~]$ ethtool eno4
Settings for eno4:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: off (auto)
Cannot get wake-on-lan settings: Operation not permitted
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes

看网卡errs情况
[root@yclb net]# cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
 bond1:   23220     387    0    0    0     0          0       181      824      12    0    0    0     0       0          0
  eno1: 2147979   16476    0    0    0     0          0      3704  1864565   12718    0    0    0     0       0          0
  eno2:  103722    1143    0    0    0     0          0        41    79952     962    0    0    0     0       0          0
  eno3: 6121649805 5079826    0    0    0     0          0   4162492 88681498  470272    0    0    0     0       0          0
  eno4: 6042294865 4660689    0    0    0     0          0   4162499  8210615   51157    0    0    0     0       0          0
 bond0: 12155845535 9734330    0    0    0     0          0   8318580 96892113  521429    0    0    0     0       0          0
    lo:  277042    2154    0    0    0     0          0         0   277042    2154    0    0    0     0       0          0
ens107f0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
ens107f1:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
ens106f0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
ens106f1:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
[root@yclb net]# 

相关参考:
https://blog.csdn.net/hezuijiudexiaobai/article/details/134457903
https://zhuanlan.zhihu.com/p/667574905

最后修改时间:2024-04-26 12:04:12
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论