在rhel上怎么追踪网卡的drop问题?

219 篇文章 2 订阅

转帖者注,个人的总结如下:
1. ifconfig -a 是总账( errors:255)
2. ethtool -S <网卡逻辑名> 是明细账(rx_errors: 255 和 rx_crc_errors: 255)

https://access.redhat.com/solutions/253703

How can I best see where packets are dropping on a network interface?

环境

  • Red Hat Enterprise Linux 6

  • Red Hat Enterprise Linux 5

  • Red Hat Enterprise Linux 4

问题

  • A single interface, or an interface within a bond is dropping packets as visible within the output of ifconfig:

Raw

eth0      Link encap:Ethernet  HWaddr 00:00:00:00:00:00  
          inet addr:X.X.X.X  Bcast:X.X.X.X  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9514004 errors:255 dropped:255 overruns:0 frame:255
          TX packets:3240402 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5761535684 (5.3 GiB)  TX bytes:873500630 (833.0 MiB)
          Interrupt:20 Memory:f1600000-f1620000 
  • How can I determine why these packets are dropping on a variety of drivers and interfaces?

决议

  • The ethtool command can give you driver-specific queues that are relative to the card and version which indicate how a drop is occurring:

  • Use ethtool -i to check the version:

Raw

# ethtool -i eth0
driver: e1000e
version: 2.1.4-k
firmware-version: 0.13-3
bus-info: 0000:00:19.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no
  • Then use ethtool -S on the interface to determine what queues are reporting drops or errors:

Raw

# ethtool -S eth0
NIC statistics:
     rx_packets: 9519644
     tx_packets: 3241625
     rx_bytes: 5800638262
     tx_bytes: 885572577
     rx_broadcast: 2617040
     tx_broadcast: 73
     rx_multicast: 2254146
     tx_multicast: 2481
     rx_errors: 255  <--Errors
     tx_errors: 0
     tx_dropped: 0
     multicast: 2254146
     collisions: 0
     rx_length_errors: 0
     rx_over_errors: 0
     rx_crc_errors: 255  <--Errors
     rx_frame_errors: 0
     rx_no_buffer_count: 0
     rx_missed_errors: 0
     tx_aborted_errors: 0
     tx_carrier_errors: 0
     tx_fifo_errors: 0
     tx_heartbeat_errors: 0
     tx_window_errors: 0
[...]
  • The above example is to be used as an example only, and shows a situation wherein there is either a failing card, cable, or switchport. In many cases, each driver will need to be analyzed separately, as they have different counters listed. If you would like detailed information about these queues, please open a case with Red Hat Global Support Services concerning the drops.
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值